webdriver-w3c-0.0.1: 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

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.

Proxy

emptyProxyConfig :: ProxyConfig Source #

ProxyConfig object with all members set to Nothing.

Timeout

emptyTimeoutConfig :: TimeoutConfig Source #

TimeoutConfig object with all members set to Nothing.

Input and Actions

emptyAction :: Action Source #

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

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

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

emptyCookie :: Cookie Source #

All members set to Nothing.

Error Responses

data ResponseErrorCode Source #