Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNoSuchElement ¶
Types ¶
type Client ¶
func (*Client) SessionWithCapabilities ¶
type Element ¶
type Element interface { GetElementAttribute(ctx context.Context, attribute string) (value string, err error) GetElementProperty(ctx context.Context, property string) (value string, err error) GetElementText(ctx context.Context) (text string, err error) Click(ctx context.Context) error SendKeys(ctx context.Context, keys string) error MoveTo(ctx context.Context) error }
type ErrorCode ¶
type ErrorCode string
var ( ElementClickIntercepted ErrorCode = "element click intercepted" ElementNotInteractable ErrorCode = "element not interactable" InsecureCertificate ErrorCode = "insecure certificate" InvalidArgument ErrorCode = "invalid argument" InvalidCookieDomain ErrorCode = "invalid cookie domain" InvalidElementState ErrorCode = "invalid element state" InvalidSelector ErrorCode = "invalid selector" InvalidSessionID ErrorCode = "invalid session id" JavascriptError ErrorCode = "javascript error" MoveTargetOutOfBounds ErrorCode = "move target out of bounds" NoSuchAlert ErrorCode = "no such alert" NoSuchCookie ErrorCode = "no such cookie" NoSuchElement ErrorCode = "no such element" NoSuchFrame ErrorCode = "no such frame" NoSuchWindow ErrorCode = "no such window" ScriptTimeout ErrorCode = "script timeout" SessionNotCreated ErrorCode = "session not created" StaleElementReference ErrorCode = "stale element reference" Timeout ErrorCode = "timeout" UnableToSetCookie ErrorCode = "unable to set cookie" UnableToCaptureScreen ErrorCode = "unable to capture screen" UnexpectedAlertOpen ErrorCode = "unexpected alert open" UnknownCommand ErrorCode = "unknown command" UnknownError ErrorCode = "unknown error" UnknownMethod ErrorCode = "unknown method" UnsupportedOperation ErrorCode = "unsupported operation" )
type FirefoxSession ¶
type LocationStrategy ¶
type LocationStrategy string
const ( CSSSelector LocationStrategy = "css selector" LinkTextSelector LocationStrategy = "link text" PartialLinkTextSelector LocationStrategy = "partial link text" TagName LocationStrategy = "tag name" XPathSelector LocationStrategy = "xpath" )
type Session ¶
type Session interface { Close(ctx context.Context) error GetCurrentURL(ctx context.Context) (url string, err error) Back(ctx context.Context) error Forward(ctx context.Context) error Refresh(ctx context.Context) error GetTitle(ctx context.Context) (title string, err error) GetWindowHandle(ctx context.Context) (handle string, err error) CloseWindow(ctx context.Context) error SwitchToWindow(ctx context.Context, handle string) error GetWindowHandles(ctx context.Context) (handles []string, err error) NewWindow(ctx context.Context) (handle, typ string, err error) SwitchToParentFrame(ctx context.Context) error GetWindowRect(ctx context.Context) (rectangle image.Rectangle, err error) SetWindowRect(ctx context.Context, rectangle image.Rectangle) error MaximizeWindow(ctx context.Context) error MinimizeWindow(ctx context.Context) error FindElement(ctx context.Context, strategy LocationStrategy, selector string) (element Element, err error) FindElements(ctx context.Context, strategy LocationStrategy, selector string) (elements []Element, err error) Screenshot(ctx context.Context) (image image.Image, err error) Source(ctx context.Context) (source string, err error) Actions(ctx context.Context, actions io.Reader) error AcceptAlert(ctx context.Context) error }
Click to show internal directories.
Click to hide internal directories.