webdriver-w3c-0.0.2: Bindings to the WebDriver API

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

Test.Tasty.WebDriver.Config

Contents

Description

 
Synopsis

Documentation

addRemoteEndForDriver :: DriverName -> RemoteEnd -> RemoteEndPool -> RemoteEndPool Source #

Push a remote end to the pool stack for a given driver.

getRemoteEndForDriver :: DriverName -> RemoteEndPool -> (RemoteEndPool, Maybe (Maybe RemoteEnd)) Source #

Attempt to pop a remote end from the pool stack for a given driver. Returns the new pool, whether or not a remote end was popped. Returns a `Just Just` if a remote end was found, a `Just Nothing` if the driver has an empty stack of remotes, and Nothing if the pool is undefined for the driver.

data RemoteEnd Source #

Representation of a remote end connection.

Constructors

RemoteEnd 

Fields

Instances
Eq RemoteEnd Source # 
Instance details

Defined in Test.Tasty.WebDriver.Config

Show RemoteEnd Source # 
Instance details

Defined in Test.Tasty.WebDriver.Config

Parsing

parseRemoteEnd :: String -> Either String RemoteEnd Source #

Parse a single remote end URI. Must include the scheme (http:/ or https:/) even though this is redundant.

parseRemoteEndConfig :: String -> Either String RemoteEndPool Source #

Parse a remote end config file. This file consists of 0 or more blocks of the form

DRIVER_NAME
- REMOTE_END_URI
- REMOTE_END_URI

where DRIVER_NAME is either geckodriver or chromedriver and each REMOTE_END_URI is the uri of a WebDriver remote end, including scheme. Blank lines are ignored.

parseRemoteEndOption :: String -> Either String RemoteEndPool Source #

Parse a remote end command line option. This option consists of 0 or more substrings of the form

DRIVER_NAME: REMOTE_END_URI REMOTE_END_URI ...

where DRIVER_NAME is either geckodriver or chromedriver and each REMOTE_END_URI is the uri of a WebDriver remote end, including scheme.

parseOptionWithArgument Source #

Arguments

:: String

Option to parse for, including hyphen(s).

-> [String]

List of command line arguments.

-> Maybe (Maybe String) 

Helper function for parsing command line options with a required argument. Assumes long-form option names starting with a hyphen. Note the return type; Just Nothing indicates that the option was not present, while Nothing indicates that the option was present but its required argument was not.