Documentation ¶
Index ¶
- Constants
- func IsStaleElementError(err error) bool
- func New() endly.Service
- func NewParser() *parser
- func Sessions(context *endly.Context) map[string]*Session
- type Action
- type CloseSessionRequest
- type CloseSessionResponse
- type MethodCall
- type OpenSessionRequest
- type OpenSessionResponse
- type PathKind
- type RunRequest
- type RunResponse
- type ServiceCallResponse
- type Session
- type StartRequest
- type StartResponse
- type StopRequest
- type StopResponse
- type Wait
- type WebDriverCallRequest
- type WebElementCallRequest
- type WebElementCallResponse
- type WebElementSelector
- type WebSelector
Constants ¶
const ( PathKindUndefined = PathKind(iota) PathKindSimple PathKindComposite )
const ( //ServiceID represents a ServiceID ServiceID = "webdriver" //SeleniumServer represents name of selenium server SeleniumServer = "selenium-server-standalone" //GeckoDriver represents name of gecko driver GeckoDriver = "geckodriver" ChromeDriver = "chromedriver" ChromeBrowser = "chrome" FirefoxBrowser = "firefox" Selenium = "webdriver" )
Variables ¶
This section is empty.
Functions ¶
func IsStaleElementError ¶ added in v0.73.1
Types ¶
type Action ¶
type Action struct { Key string //optional result key PathKind Selector *WebElementSelector Calls []*MethodCall }
Action represents various calls on web element
type CloseSessionRequest ¶
type CloseSessionRequest struct {
SessionID string
}
CloseSessionRequest represents close session request.
func NewCloseSessionRequestFromURL ¶
func NewCloseSessionRequestFromURL(URL string) (*CloseSessionRequest, error)
NewCloseSessionRequestFromURL creates a new close session request from URL
type CloseSessionResponse ¶
type CloseSessionResponse struct {
SessionID string
}
CloseSessionResponse represents close session response.
type MethodCall ¶
MethodCall represents selenium call.
type OpenSessionRequest ¶
type OpenSessionRequest struct { Browser string Capabilities []string Remote string `description:"webdriver server endpoint"` SessionID string `description:"if specified this SessionID will be used for a sessionID"` }
OpenSessionRequest represents open session request
func NewOpenSessionRequest ¶
func NewOpenSessionRequest(browser string, remote string) *OpenSessionRequest
NewOpenSessionRequest creates a new open session request
func (*OpenSessionRequest) Init ¶
func (r *OpenSessionRequest) Init() error
Init initializes request
type OpenSessionResponse ¶
type OpenSessionResponse struct {
SessionID string
}
OpenSessionResponse represents open session response.
type RunRequest ¶
type RunRequest struct { SessionID string Browser string RemoteSelenium string //remote selenium resource Actions []*Action ActionDelaysMs int `description:"slows down action with specified delay"` Commands []interface{} `` /* 130-byte string literal not displayed */ Expect interface{} `description:"If specified it will validated response as actual"` }
RunRequest represents group of selenium web elements calls
func NewRunRequest ¶
func NewRunRequest(sessionID, browser string, remote string, actions ...*Action) *RunRequest
NewRunRequest creates a new run request
func NewRunRequestFromURL ¶
func NewRunRequestFromURL(URL string) (*RunRequest, error)
NewRunRequestFromURL creates a new request from URL
func (*RunRequest) Init ¶
func (r *RunRequest) Init() error
func (*RunRequest) IsInput ¶
func (r *RunRequest) IsInput() bool
IsInput returns this request (CLI reporter interface)
func (*RunRequest) Messages ¶
func (r *RunRequest) Messages() []*msg.Message
IsInput returns this request (CLI reporter interface)
type RunResponse ¶
type RunResponse struct { SessionID string Data map[string]interface{} LookupErrors []string Assert *validator.AssertResponse }
RunResponse represents selenium call response
func (*RunResponse) IsOutput ¶
func (r *RunResponse) IsOutput() bool
IsOutput returns this response (CLI reporter interface)
func (*RunResponse) Messages ¶
func (r *RunResponse) Messages() []*msg.Message
Messages returns messages
type ServiceCallResponse ¶
ServiceCallResponse represents selenium call response
type Session ¶
type Session struct { SessionID string Browser string Pid int Server string Capabilities []string // contains filtered or unexported fields }
Session represents a selenium session
type StartRequest ¶
type StartRequest struct { Target *location.Resource Driver string Server string Sdk string Capabilities []string Port int }
StartRequest represents a selenium server start request
func NewStartRequestFromURL ¶
func NewStartRequestFromURL(URL string) (*StartRequest, error)
NewStartRequestFromURL creates a new start request from URL
func (*StartRequest) Init ¶
func (r *StartRequest) Init() error
func (*StartRequest) Validate ¶
func (r *StartRequest) Validate() error
type StartResponse ¶
StartResponse represents a selenium server stop request
type StopRequest ¶
StopRequest represents server stop request
func NewStopRequestFromURL ¶
func NewStopRequestFromURL(URL string) (*StopRequest, error)
NewStopRequestFromURL creates a new start request from URL
func (*StopRequest) Init ¶
func (r *StopRequest) Init() error
type WebDriverCallRequest ¶
type WebDriverCallRequest struct { SessionID string Key string PathKind PathKind Call *MethodCall }
WebDriverCallRequest represents selenium call driver request
type WebElementCallRequest ¶
type WebElementCallRequest struct { SessionID string Selector *WebElementSelector Call *MethodCall PathKind PathKind }
WebElementCallRequest represents a web element call reqesut
type WebElementCallResponse ¶
type WebElementCallResponse struct { Result []interface{} LookupError string Data map[string]interface{} }
WebElementCallResponse represents seleniun web element response
type WebElementSelector ¶
type WebElementSelector struct { By string //selector type Value string //selector value Key string //optional result key }
WebElementSelector represents a web element selector
func NewWebElementSelector ¶
func NewWebElementSelector(by, value string) *WebElementSelector
NewWebElementSelector creates a new instance of web element selector
func (*WebElementSelector) Init ¶
func (s *WebElementSelector) Init() error
Validate checks is selector is valid.
func (*WebElementSelector) Validate ¶
func (s *WebElementSelector) Validate() error
Validate checks is selector is valid.
type WebSelector ¶
type WebSelector string
func (WebSelector) ByAndValue ¶
func (s WebSelector) ByAndValue() (by, value string)