webdriver-0.14.0.0: a Haskell client for the Selenium WebDriver protocol
Safe HaskellNone
LanguageHaskell2010

Test.WebDriver.Types

Synopsis

Documentation

data WebDriverContext Source #

The WebDriverContext is an opaque type used by this library for bookkeeping purposes. It tracks all the processes we spin up and all the sessions we create.

Currently, we will create at most 1 Selenium or Chromedriver process per WebDriverContext, and N Geckodriver processes, where N is the number of Firefox sessions you request.

data DriverConfig Source #

Configuration for how to launch a given driver.

Constructors

DriverConfigSeleniumJar

For launching a WebDriver via "java -jar selenium.jar". Selenium can launch other drivers on your behalf. You should pass these as driverConfigSubDrivers.

Fields

DriverConfigGeckodriver 

Fields

DriverConfigChromedriver 

Fields

SessionState class

class SessionState (m :: Type -> Type) where Source #

Instances

Instances details
SessionState WD Source # 
Instance details

Defined in Test.WebDriver.WD

class SessionState m => SessionStatePut (m :: Type -> Type) where Source #

Methods

withModifiedSession :: (Session -> Session) -> m a -> m a Source #

WebDriver sessions

newtype SessionId Source #

An opaque identifier for a WebDriver session. These handles are produced by the server on session creation, and act to identify a session in progress.

Constructors

SessionId Text 

Instances

Instances details
FromJSON SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

ToJSON SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

IsString SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

Read SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

Show SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

Eq SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

Ord SessionId Source # 
Instance details

Defined in Test.WebDriver.Types

data Session Source #

Instances

Instances details
Show Session Source # 
Instance details

Defined in Test.WebDriver.Types

MonadReader Session WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

ask :: WD Session #

local :: (Session -> Session) -> WD a -> WD a #

reader :: (Session -> a) -> WD a #

Exceptions

Stack frames

data StackFrame Source #

An individual stack frame from the stack trace provided by the server during a FailedCommand.

Instances

Instances details
FromJSON StackFrame Source # 
Instance details

Defined in Test.WebDriver.Types

Show StackFrame Source # 
Instance details

Defined in Test.WebDriver.Types

Eq StackFrame Source # 
Instance details

Defined in Test.WebDriver.Types

WebDriver class

class MonadUnliftIO m => WebDriverBase (m :: Type -> Type) where Source #

A class for monads that can handle wire protocol requests. This is the operation underlying all of the high-level commands exported in Test.WebDriver.Commands.

Methods

doCommandBase Source #

Arguments

:: (HasCallStack, ToJSON a) 
=> Driver 
-> Method

HTTP request method

-> Text

URL of request

-> a

JSON parameters passed in the body of the request. Note that, as a special case, anything that converts to Data.Aeson.Null will result in an empty request body.

-> m (Response ByteString)

The response of the HTTP request.

Instances

Instances details
WebDriverBase WD Source # 
Instance details

Defined in Test.WebDriver.WD

WebDriverBase (LoggingT IO) Source # 
Instance details

Defined in Test.WebDriver.WD

type Method = ByteString #

HTTP method (flat ByteString type).

methodDelete :: Method #

HTTP DELETE Method

methodGet :: Method #

HTTP GET Method

methodPost :: Method #

HTTP POST Method