Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- type Session = String
- webdriver :: Label "webdriver" WebDriver
- webdriverSession :: Label "webdriverSession" WebDriverSession
- type WebDriverContext context wd = (HasLabel context "webdriver" WebDriver, WebDriver (ExampleT context wd))
- class HasWebDriver a where
- getWebDriver :: a -> WebDriver
- type ToolsRoot = FilePath
- data WhenToSave
- = Always
- | OnException
- | Never
- data RunMode
- data WdOptions = WdOptions {
- toolsRoot :: ToolsRoot
- capabilities :: Capabilities
- saveSeleniumMessageHistory :: WhenToSave
- seleniumToUse :: SeleniumToUse
- chromeBinaryPath :: Maybe FilePath
- chromeDriverToUse :: ChromeDriverToUse
- firefoxBinaryPath :: Maybe FilePath
- geckoDriverToUse :: GeckoDriverToUse
- runMode :: RunMode
- httpManager :: Maybe Manager
- httpRetryCount :: Int
- data SeleniumToUse
- data ChromeDriverToUse
- data GeckoDriverToUse
- newtype ChromeVersion = ChromeVersion (Int, Int, Int, Int)
- data ChromeDriverVersion
- newtype FirefoxVersion = FirefoxVersion (Int, Int, Int)
- newtype GeckoDriverVersion = GeckoDriverVersion (Int, Int, Int)
- data HeadlessConfig = HeadlessConfig {
- headlessResolution :: Maybe (Int, Int)
- defaultHeadlessConfig :: HeadlessConfig
- data XvfbConfig = XvfbConfig {
- xvfbResolution :: Maybe (Int, Int)
- xvfbStartFluxbox :: Bool
- defaultXvfbConfig :: XvfbConfig
- defaultWdOptions :: FilePath -> WdOptions
- data WebDriver = WebDriver {}
- data InvalidLogsException = InvalidLogsException [LogEntry]
- data XvfbSession = XvfbSession {}
- type WebDriverSession = (Session, IORef WDSession)
- getWdOptions :: WebDriver -> WdOptions
- getDisplayNumber :: WebDriver -> Maybe Int
- getXvfbSession :: WebDriver -> Maybe XvfbSession
- getWebDriverName :: WebDriver -> String
- fastX11VideoOptions :: [String]
- qualityX11VideoOptions :: [String]
- defaultAvfoundationOptions :: [String]
- defaultGdigrabOptions :: [String]
- data VideoSettings = VideoSettings {
- x11grabOptions :: [String]
- avfoundationOptions :: [String]
- gdigrabOptions :: [String]
- hideMouseWhenRecording :: Bool
- logToDisk :: Bool
- defaultVideoSettings :: VideoSettings
Documentation
Labels
webdriverSession :: Label "webdriverSession" WebDriverSession Source #
type WebDriverContext context wd = (HasLabel context "webdriver" WebDriver, WebDriver (ExampleT context wd)) Source #
class HasWebDriver a where Source #
getWebDriver :: a -> WebDriver Source #
Instances
HasWebDriver WebDriver Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types getWebDriver :: WebDriver -> WebDriver Source # |
data WhenToSave Source #
Instances
Show WhenToSave Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> WhenToSave -> ShowS # show :: WhenToSave -> String # showList :: [WhenToSave] -> ShowS # | |
Eq WhenToSave Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types (==) :: WhenToSave -> WhenToSave -> Bool # (/=) :: WhenToSave -> WhenToSave -> Bool # |
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.
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. |
WdOptions | |
|
data SeleniumToUse Source #
How to obtain the Selenium server JAR file.
DownloadSeleniumFrom String | Download selenium from the given URL to the |
DownloadSeleniumDefault | Download selenium from a default location to the |
UseSeleniumAt FilePath | Use the JAR file at the given path |
Instances
Show SeleniumToUse Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> SeleniumToUse -> ShowS # show :: SeleniumToUse -> String # showList :: [SeleniumToUse] -> ShowS # |
data ChromeDriverToUse Source #
How to obtain the chromedriver binary.
DownloadChromeDriverFrom String | Download chromedriver from the given URL to the |
DownloadChromeDriverVersion ChromeDriverVersion | Download the given chromedriver version to the |
DownloadChromeDriverAutodetect (Maybe FilePath) | Autodetect chromedriver to use based on the Chrome version and download it to the |
UseChromeDriverAt FilePath | Use the chromedriver at the given path |
Instances
Show ChromeDriverToUse Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> ChromeDriverToUse -> ShowS # show :: ChromeDriverToUse -> String # showList :: [ChromeDriverToUse] -> ShowS # |
data GeckoDriverToUse Source #
How to obtain the geckodriver binary.
DownloadGeckoDriverFrom String | Download geckodriver from the given URL to the |
DownloadGeckoDriverVersion GeckoDriverVersion | Download the given geckodriver version to the |
DownloadGeckoDriverAutodetect (Maybe FilePath) | Autodetect geckodriver to use based on the Gecko version and download it to the |
UseGeckoDriverAt FilePath | Use the geckodriver at the given path |
Instances
Show GeckoDriverToUse Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> GeckoDriverToUse -> ShowS # show :: GeckoDriverToUse -> String # showList :: [GeckoDriverToUse] -> ShowS # |
newtype ChromeVersion Source #
ChromeVersion (Int, Int, Int, Int) |
Instances
Show ChromeVersion Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> ChromeVersion -> ShowS # show :: ChromeVersion -> String # showList :: [ChromeVersion] -> ShowS # |
data ChromeDriverVersion Source #
Instances
Show ChromeDriverVersion Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> ChromeDriverVersion -> ShowS # show :: ChromeDriverVersion -> String # showList :: [ChromeDriverVersion] -> ShowS # |
newtype FirefoxVersion Source #
FirefoxVersion (Int, Int, Int) |
Instances
Show FirefoxVersion Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> FirefoxVersion -> ShowS # show :: FirefoxVersion -> String # showList :: [FirefoxVersion] -> ShowS # |
newtype GeckoDriverVersion Source #
GeckoDriverVersion (Int, Int, Int) |
Instances
Show GeckoDriverVersion Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> GeckoDriverVersion -> ShowS # show :: GeckoDriverVersion -> String # showList :: [GeckoDriverVersion] -> ShowS # |
data HeadlessConfig Source #
HeadlessConfig | |
|
defaultHeadlessConfig :: HeadlessConfig Source #
Default headless config.
data XvfbConfig Source #
XvfbConfig | |
|
defaultXvfbConfig :: XvfbConfig Source #
Default Xvfb settings.
defaultWdOptions :: FilePath -> WdOptions Source #
The default WdOptions
object.
You should start with this and modify it using the accessors.
WebDriver | |
|
Instances
HasWebDriver WebDriver Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types getWebDriver :: WebDriver -> WebDriver Source # |
data InvalidLogsException Source #
Instances
Exception InvalidLogsException Source # | |
Show InvalidLogsException Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> InvalidLogsException -> ShowS # show :: InvalidLogsException -> String # showList :: [InvalidLogsException] -> ShowS # |
data XvfbSession Source #
Instances
Show XvfbSession Source # | |
Defined in Test.Sandwich.WebDriver.Internal.Types showsPrec :: Int -> XvfbSession -> ShowS # show :: XvfbSession -> String # showList :: [XvfbSession] -> ShowS # |
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 :: [String] 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 #
VideoSettings | |
|
defaultVideoSettings :: VideoSettings Source #
Default video settings.