Documentation ¶
Index ¶
- type Driver
- func (d *Driver) Close() error
- func (d *Driver) FindByCSSSelector(selector string) (Element, error)
- func (d *Driver) FindByIndex(index uint) (Element, error)
- func (d *Driver) FindByLinkText(text string) (Element, error)
- func (d *Driver) FindByPartialLinkText(partialText string) (Element, error)
- func (d *Driver) FindByXPath(xpath string) (Element, error)
- func (d *Driver) FindElemsByCSSSelector(selector string) ([]Element, error)
- func (d *Driver) FindElemsByLinkText(text string) ([]Element, error)
- func (d *Driver) FindElemsByPartialLinkText(partialText string) ([]Element, error)
- func (d *Driver) FindElemsByXPath(xpath string) ([]Element, error)
- func (d *Driver) Navigate(url string) error
- func (d *Driver) Refresh() error
- func (d *Driver) Screenshot() (image.Image, error)
- func (d *Driver) ScreenshotBase64() (string, error)
- func (d *Driver) Size() (int, int, error)
- func (d *Driver) URL() string
- type Element
- func (e *Element) Attr(attribute string) (string, error)
- func (e *Element) CSSAttr(attribute string) (string, error)
- func (e *Element) Clear() error
- func (e *Element) Click() error
- func (e *Element) Enabled() (bool, error)
- func (e *Element) ID() string
- func (e *Element) Rect() (Rect, error)
- func (e *Element) Selected() (bool, error)
- func (e *Element) Tag() (string, error)
- func (e *Element) Text() (string, error)
- func (e *Element) Type(text string) error
- type Rect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver contains all the data and methods for a chrome driver
func CreateDriver ¶
CreateDriver starts a driver and sets up the session
func (*Driver) FindByCSSSelector ¶
FindByCSSSelector finds an element by its css selector
func (*Driver) FindByIndex ¶
FindByIndex finds an element by its index on the page's elements
func (*Driver) FindByLinkText ¶
FindByLinkText finds a link by link text
func (*Driver) FindByPartialLinkText ¶
FindByPartialLinkText finds a link by part of its text
func (*Driver) FindByXPath ¶
FindByXPath finds an element by its XPath
func (*Driver) FindElemsByCSSSelector ¶
FindElemsByCSSSelector finds elements by a css selector
func (*Driver) FindElemsByLinkText ¶
FindElemsByLinkText finds links by their text
func (*Driver) FindElemsByPartialLinkText ¶
FindElemsByPartialLinkText finds a links by part of their text
func (*Driver) FindElemsByXPath ¶
FindElemsByXPath finds elements by their XPath
func (*Driver) Screenshot ¶
Screenshot gets a screenshot of the window
func (*Driver) ScreenshotBase64 ¶
ScreenshotBase64 gets a base64 screenshot of the window
type Element ¶
type Element struct {
// contains filtered or unexported fields
}
Element has all the element functions