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

Test.Sandwich.WebDriver.Binaries

Description

Obtain various binaries you might need for WebDriver testing.

Synopsis

Selenium

obtainSelenium Source #

Arguments

:: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLogger m) 
=> SeleniumToUse

How to obtain Selenium

-> m FilePath 

Manually obtain a Selenium server JAR file, according to the SeleniumToUse policy, storing it under the provided FilePath if necessary and returning the exact path.

data SeleniumToUse Source #

How to obtain the Selenium server JAR file.

Constructors

DownloadSeleniumFrom FilePath String

Download selenium from the given URL to the toolsRoot

DownloadSeleniumDefault FilePath

Download selenium from a default location to the toolsRoot

UseSeleniumAt FilePath

Use the JAR file at the given path

UseSeleniumFromNixpkgs NixContext

Use the Selenium in the given Nixpkgs derivation

Chrome

obtainChrome :: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLogger m) => ChromeToUse -> m (Either Text FilePath) Source #

Manually obtain a chrome binary, according to the ChromeToUse policy,

data ChromeToUse Source #

How to obtain the chrome binary.

Constructors

UseChromeFromPath

Search the PATH for the google-chrome or google-chrome-stable binary.

UseChromeAt FilePath

Use the Chrome at the given path.

UseChromeFromNixpkgs NixContext

Get Chrome from Nixpkgs.

Chrome driver

obtainChromeDriver Source #

Arguments

:: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLogger m) 
=> ChromeDriverToUse

How to obtain chromedriver

-> m (Either Text FilePath) 

Manually obtain a chromedriver binary, according to the ChromeDriverToUse policy.

data ChromeDriverToUse Source #

How to obtain the chromedriver binary.

Constructors

DownloadChromeDriverFrom FilePath String

Download chromedriver from the given URL to the toolsRoot.

DownloadChromeDriverVersion FilePath ChromeDriverVersion

Download the given chromedriver version to the toolsRoot.

DownloadChromeDriverAutodetect FilePath FilePath

Autodetect chromedriver to use based on the Chrome version and download it to the toolsRoot Pass the path to the Chrome binary, or else it will be found by looking for google-chrome on the PATH.

UseChromeDriverAt FilePath

Use the chromedriver at the given path.

UseChromeDriverFromNixpkgs NixContext

Use the chromedriver in the given Nixpkgs derivation.

Firefox

obtainFirefox :: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLogger m) => FirefoxToUse -> m (Either Text FilePath) Source #

Manually obtain a firefox binary, according to the FirefoxToUse policy,

data FirefoxToUse Source #

How to obtain the firefox binary.

Constructors

UseFirefoxFromPath

Search the PATH for the firefox binary.

UseFirefoxAt FilePath

Use the Firefox at the given path.

UseFirefoxFromNixpkgs NixContext

Get Firefox from Nixpkgs.

Geckodriver

obtainGeckoDriver Source #

Arguments

:: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLogger m) 
=> GeckoDriverToUse

How to obtain geckodriver

-> m (Either Text FilePath) 

Manually obtain a geckodriver binary, according to the GeckoDriverToUse policy, storing it under the provided FilePath if necessary and returning the exact path.

data GeckoDriverToUse Source #

How to obtain the geckodriver binary.

Constructors

DownloadGeckoDriverFrom FilePath String

Download geckodriver from the given URL to the toolsRoot.

DownloadGeckoDriverVersion FilePath GeckoDriverVersion

Download the given geckodriver version to the toolsRoot.

DownloadGeckoDriverAutodetect FilePath

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

UseGeckoDriverAt FilePath

Use the geckodriver at the given path.

UseGeckoDriverFromNixpkgs NixContext

Use the geckodriver in the given Nixpkgs derivation.

Ffmpeg

obtainFfmpeg :: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLoggerIO m, MonadMask m) => FfmpegToUse -> m (Either Text FilePath) Source #

Manually obtain an ffmpeg binary, according to the FfmpegToUse policy.

data FfmpegToUse Source #

How to obtain the ffmpeg binary.

Constructors

UseFfmpegFromPath

Search the PATH for the ffmpeg binary.

UseFfmpegAt FilePath

Use the ffmpeg at the given path.

UseFfmpegFromNixpkgs NixContext

Get ffmpeg from Nixpkgs.

Xvfb

obtainXvfb :: (MonadReader context m, HasBaseContext context, MonadUnliftIO m, MonadLoggerIO m) => XvfbToUse -> m (Either Text FilePath) Source #

Manually obtain an Xvfb binary, according to the XvfbToUse policy.

data XvfbToUse Source #

How to obtain the Xvfb binary.

Constructors

UseXvfbFromPath

Search the PATH for the Xvfb binary.

UseXvfbAt FilePath

Use the Xvfb at the given path.

UseXvfbFromNixpkgs NixContext

Get Xvfb from Nixpkgs.

Instances

Instances details
Show XvfbToUse Source # 
Instance details

Defined in Test.Sandwich.WebDriver.Internal.Binaries.Xvfb.Types

data FluxboxToUse Source #

How to obtain the fluxbox binary.

Constructors

UseFluxboxFromPath

Search the PATH for the fluxbox binary.

UseFluxboxAt FilePath

Use the fluxbox at the given path.

UseFluxboxFromNixpkgs NixContext

Get fluxbox from Nixpkgs.