sandwich-webdriver-0.1.0.4: Sandwich integration with Selenium WebDriver
Safe HaskellNone
LanguageHaskell2010

Test.Sandwich.WebDriver.Internal.Types

Synopsis

Documentation

type Session = String Source #

Session is just a String name

Labels

type WebDriverContext context wd = (HasLabel context "webdriver" WebDriver, WebDriver (ExampleT context wd)) Source #

class HasWebDriver a where Source #

Instances

Instances details
HasWebDriver WebDriver Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Types

data WhenToSave Source #

Constructors

Always 
OnException 
Never 

Instances

Instances details
Eq WhenToSave Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Types

Show WhenToSave Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Types

data RunMode Source #

Headless and Xvfb modes are useful because they allow you to run tests in the background, without popping up browser windows. This is useful for development or for running on a CI server, and is also more reproducible since the screen resolution can be fixed. In addition, Xvfb mode allows videos to be recorded of tests.

Constructors

Normal

Normal Selenium behavior; will pop up a web browser.

RunHeadless HeadlessConfig

Run with a headless browser. Supports screenshots but videos will be black.

RunInXvfb XvfbConfig

Run inside Xvfb so that tests run in their own X11 display. xvfb-run script must be installed and on the PATH.

data WdOptions Source #

Constructors

WdOptions 

Fields

data SeleniumToUse Source #

How to obtain the Selenium server JAR file.

Constructors

DownloadSeleniumFrom String

Download selenium from the given URL to the toolsRoot

DownloadSeleniumDefault

Download selenium from a default location to the toolsRoot

UseSeleniumAt FilePath

Use the JAR file at the given path

data ChromeDriverToUse Source #

How to obtain the chromedriver binary.

Constructors

DownloadChromeDriverFrom String

Download chromedriver from the given URL to the toolsRoot

DownloadChromeDriverVersion ChromeDriverVersion

Download the given chromedriver version to the toolsRoot

DownloadChromeDriverAutodetect

Autodetect chromedriver to use based on the Chrome version and download it to the toolsRoot

UseChromeDriverAt FilePath

Use the chromedriver at the given path

data GeckoDriverToUse Source #

How to obtain the geckodriver binary.

Constructors

DownloadGeckoDriverFrom String

Download geckodriver from the given URL to the toolsRoot

DownloadGeckoDriverVersion GeckoDriverVersion

Download the given geckodriver version to the toolsRoot

DownloadGeckoDriverAutodetect

Autodetect geckodriver to use based on the Gecko version and download it to the toolsRoot

UseGeckoDriverAt FilePath

Use the geckodriver at the given path

newtype ChromeVersion Source #

Constructors

ChromeVersion (Int, Int, Int, Int) 

Instances

Instances details
Show ChromeVersion Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Types

newtype FirefoxVersion Source #

Constructors

FirefoxVersion (Int, Int, Int) 

Instances

Instances details
Show FirefoxVersion Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Types

data HeadlessConfig Source #

Constructors

HeadlessConfig 

Fields

data XvfbConfig Source #

Constructors

XvfbConfig 

Fields

defaultWdOptions :: FilePath -> WdOptions Source #

The default WdOptions object. You should start with this and modify it using the accessors.

getWdOptions :: WebDriver -> WdOptions Source #

Get the WdOptions associated with the WebDriver

getDisplayNumber :: WebDriver -> Maybe Int Source #

Get the X11 display number associated with the WebDriver. Only present if running in RunInXvfb mode.

getXvfbSession :: WebDriver -> Maybe XvfbSession Source #

Get the Xvfb session associated with the WebDriver, if present

Video stuff

fastX11VideoOptions :: [String] Source #

Default options for fast X11 video recording.

qualityX11VideoOptions :: [[Char]] Source #

Default options for quality X11 video recording.

defaultAvfoundationOptions :: [String] Source #

Default options for AVFoundation recording (for Darwin).

defaultGdigrabOptions :: [String] Source #

Default options for gdigrab recording (for Windows).

data VideoSettings Source #

Constructors

VideoSettings 

Fields

defaultVideoSettings :: VideoSettings Source #

Default video settings.