webdriver-w3c-0.0.2: Bindings to the WebDriver API

Copyright2018 Automattic Inc.
LicenseGPL-3
MaintainerNathan Bloomfield (nbloomf@gmail.com)
Stabilityexperimental
PortabilityPOSIX
Safe HaskellNone
LanguageHaskell2010

Web.Api.WebDriver.Types

Contents

Description

The WebDriver protocol involves passing several different kinds of JSON objects. We can encode these as types to make our DSL more robust; this module is a grab bag of these types. For each one we need ToJSON and FromJSON instances, and sometimes also a default value.

Note that while the WebDriver spec defines some JSON objects, in general a given WebDriver server can accept additional properties on any given object. Our types here will be limited to the "spec" object signatures, but our API will need to be user extensible.

Synopsis

Stringy Types

type AttributeName = String Source #

Used with getElementAttribute.

type PropertyName = String Source #

Used with getElementProperty.

type Script = String Source #

Javascript

type CookieName = String Source #

Used with getNamedCookie.

type CssPropertyName = String Source #

Used with getElementCssValue.

Capabilities

data Capabilities Source #

Constructors

Capabilities 

data BrowserName Source #

Used in Capabilities.

Constructors

Firefox 
Chrome 
Safari 
Instances
Bounded BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON BrowserName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

data PlatformName Source #

Used in Capabilities.

Constructors

Mac 
Instances
Bounded PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON PlatformName Source # 
Instance details

Defined in Web.Api.WebDriver.Types

defaultFirefoxCapabilities :: Capabilities Source #

All members set to Nothing except _browserName, which is Just Firefox.

headlessFirefoxCapabilities :: Capabilities Source #

Passing the "-headless" parameter to Firefox.

defaultChromeCapabilities :: Capabilities Source #

All members set to Nothing except _browserName, which is Just Chrome.

data LogLevel Source #

Proxy

emptyProxyConfig :: ProxyConfig Source #

ProxyConfig object with all members set to Nothing.

data ProxyType Source #

Constructors

ProxyPac
pac
ProxyDirect
direct
ProxyAutodetect
autodetect
ProxySystem
system
ProxyManual
manual

Timeout

emptyTimeoutConfig :: TimeoutConfig Source #

TimeoutConfig object with all members set to Nothing.

Input and Actions

data InputSource Source #

Instances
Bounded InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON InputSource Source # 
Instance details

Defined in Web.Api.WebDriver.Types

data PointerSubtype Source #

Constructors

PointerMouse
mouse
PointerPen
pen
PointerTouch
touch
Instances
Bounded PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON PointerSubtype Source # 
Instance details

Defined in Web.Api.WebDriver.Types

emptyAction :: Action Source #

All members set to Nothing except _actionItems, which is the empty list.

data ActionType Source #

Constructors

PauseAction
pause
KeyUpAction
keyUp
KeyDownAction
keyDown
PointerDownAction
pointerDown
PointerUpAction
pointerUp
PointerMoveAction
pointerMove
PointerCancelAction
pointerCancel
Instances
Bounded ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON ActionType Source # 
Instance details

Defined in Web.Api.WebDriver.Types

emptyActionItem :: ActionItem Source #

All members set to Nothing.

Misc

data LocationStrategy Source #

Constructors

CssSelector
css selector
LinkTextSelector
link text
PartialLinkTextSelector
partial link text
TagName
tag name
XPathSelector
xpath
Instances
Bounded LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON LocationStrategy Source # 
Instance details

Defined in Web.Api.WebDriver.Types

data Rect Source #

Instances
Eq Rect Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Methods

(==) :: Rect -> Rect -> Bool #

(/=) :: Rect -> Rect -> Bool #

Show Rect Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Methods

showsPrec :: Int -> Rect -> ShowS #

show :: Rect -> String #

showList :: [Rect] -> ShowS #

Arbitrary Rect Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Methods

arbitrary :: Gen Rect #

shrink :: Rect -> [Rect] #

ToJSON Rect Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON Rect Source # 
Instance details

Defined in Web.Api.WebDriver.Types

emptyRect :: Rect Source #

All members set to `0`.

data PromptHandler Source #

Constructors

DismissPrompts
dismiss
AcceptPrompts
accept
DismissPromptsAndNotify
dismiss and notify
AcceptPromptsAndNotify
accept and notify
IgnorePrompts
ignore
Instances
Bounded PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Enum PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Eq PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Show PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

Arbitrary PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

ToJSON PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

FromJSON PromptHandler Source # 
Instance details

Defined in Web.Api.WebDriver.Types

emptyCookie :: Cookie Source #

All members set to Nothing.

Error Responses

data ResponseErrorCode Source #