Documentation ¶
Overview ¶
Package api provides a generic, low-level WebDriver API client for Go. All methods map directly to endpoints of the WebDriver Wire Protocol: https://code.google.com/p/selenium/wiki/JsonWireProtocol
This package was previously internal to the agouti package. It currently does not have a fixed API, but this will change in the near future (with the addition of adequate documentation).
Index ¶
- type Bus
- type Button
- type Cookie
- type Element
- func (e *Element) Clear() error
- func (e *Element) Click() error
- func (e *Element) GetAttribute(attribute string) (string, error)
- func (e *Element) GetCSS(property string) (string, error)
- func (e *Element) GetElement(selector Selector) (*Element, error)
- func (e *Element) GetElements(selector Selector) ([]*Element, error)
- func (e *Element) GetLocation() (x, y int, err error)
- func (e *Element) GetName() (string, error)
- func (e *Element) GetText() (string, error)
- func (e *Element) IsDisplayed() (bool, error)
- func (e *Element) IsEnabled() (bool, error)
- func (e *Element) IsEqualTo(other *Element) (bool, error)
- func (e *Element) IsSelected() (bool, error)
- func (e *Element) Send(method, endpoint string, body, result interface{}) error
- func (e *Element) Submit() error
- func (e *Element) Value(text string) error
- type Log
- type Offset
- type ScalarSpeed
- type Selector
- type Session
- func (s *Session) AcceptAlert() error
- func (s *Session) Back() error
- func (s *Session) ButtonDown(button Button) error
- func (s *Session) ButtonUp(button Button) error
- func (s *Session) Click(button Button) error
- func (s *Session) Delete() error
- func (s *Session) DeleteCookie(cookieName string) error
- func (s *Session) DeleteCookies() error
- func (s *Session) DeleteLocalStorage() error
- func (s *Session) DeleteSessionStorage() error
- func (s *Session) DeleteWindow() error
- func (s *Session) DismissAlert() error
- func (s *Session) DoubleClick() error
- func (s *Session) Execute(body string, arguments []interface{}, result interface{}) error
- func (s *Session) Forward() error
- func (s *Session) Frame(frame *Element) error
- func (s *Session) FrameParent() error
- func (s *Session) GetActiveElement() (*Element, error)
- func (s *Session) GetAlertText() (string, error)
- func (s *Session) GetCookies() ([]*Cookie, error)
- func (s *Session) GetElement(selector Selector) (*Element, error)
- func (s *Session) GetElements(selector Selector) ([]*Element, error)
- func (s *Session) GetLogTypes() ([]string, error)
- func (s *Session) GetScreenshot() ([]byte, error)
- func (s *Session) GetSource() (string, error)
- func (s *Session) GetTitle() (string, error)
- func (s *Session) GetURL() (string, error)
- func (s *Session) GetWindow() (*Window, error)
- func (s *Session) GetWindows() ([]*Window, error)
- func (s *Session) MoveTo(region *Element, offset Offset) error
- func (s *Session) NewLogs(logType string) ([]Log, error)
- func (s *Session) Refresh() error
- func (s *Session) SetAlertText(text string) error
- func (s *Session) SetCookie(cookie *Cookie) error
- func (s *Session) SetURL(url string) error
- func (s *Session) SetWindow(window *Window) error
- func (s *Session) SetWindowByName(name string) error
- func (s *Session) TouchClick(element *Element) error
- func (s *Session) TouchDoubleClick(element *Element) error
- func (s *Session) TouchDown(x, y int) error
- func (s *Session) TouchFlick(element *Element, offset Offset, speed Speed) error
- func (s *Session) TouchLongClick(element *Element) error
- func (s *Session) TouchMove(x, y int) error
- func (s *Session) TouchScroll(element *Element, offset Offset) error
- func (s *Session) TouchUp(x, y int) error
- type Speed
- type VectorSpeed
- type WebDriver
- type Window
- type XOffset
- type XYOffset
- type YOffset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cookie ¶
type Cookie struct { // Name is the name of the cookie (required) Name string `json:"name"` // Value is the value of the cookie (required) Value string `json:"value"` // Path is the path of the cookie (default: "/") Path string `json:"path,omitempty"` // Domain is the domain of the cookie (default: current page domain) Domain string `json:"domain,omitempty"` // Secure is set to true for secure cookies (default: false) Secure bool `json:"secure,omitempty"` // HTTPOnly is set to true for HTTP-Only cookies (default: false) HTTPOnly bool `json:"httpOnly,omitempty"` // Expiry is the time when the cookie expires Expiry int64 `json:"expiry,omitempty"` }
A Cookie defines a web cookie
type Element ¶
func (*Element) GetLocation ¶
func (*Element) IsDisplayed ¶
func (*Element) IsSelected ¶
type ScalarSpeed ¶
type ScalarSpeed uint
type Session ¶
type Session struct {
Bus
}
func (*Session) AcceptAlert ¶
func (*Session) ButtonDown ¶
func (*Session) DeleteCookie ¶
func (*Session) DeleteCookies ¶
func (*Session) DeleteLocalStorage ¶
func (*Session) DeleteSessionStorage ¶
func (*Session) DeleteWindow ¶
func (*Session) DismissAlert ¶
func (*Session) DoubleClick ¶
func (*Session) FrameParent ¶
func (*Session) GetActiveElement ¶
func (*Session) GetAlertText ¶
func (*Session) GetCookies ¶
func (*Session) GetLogTypes ¶
func (*Session) GetScreenshot ¶
func (*Session) GetWindows ¶
func (*Session) SetAlertText ¶
func (*Session) SetWindowByName ¶
func (*Session) TouchClick ¶
func (*Session) TouchDoubleClick ¶
func (*Session) TouchFlick ¶
func (*Session) TouchLongClick ¶
type VectorSpeed ¶
type WebDriver ¶
type WebDriver struct { Timeout time.Duration Debug bool // contains filtered or unexported fields }
func NewWebDriver ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.