webdriver
Safe HaskellNone
LanguageHaskell2010

Test.WebDriver.Capabilities

Description

This module contains the types for working with WebDriver Capabilities. Capabilities are used to configure and communicate the features supported by a session.

Some settings, like _capabilitiesTimeouts, are browser-agnostic. But the Capabilities object is also where browser-specific settings can be added, under _capabilitiesGoogChromeOptions, _capabilitiesMozFirefoxOptions, etc.

This module provides lenses for all of the fields it defines, to make it easier to manipulate nested values.

Synopsis

Capabilities

data Capabilities Source #

A structure describing the capabilities of a session. This record serves dual roles.

It's used to specify the desired capabilities for a session before it's created. In this usage, fields that are set to Nothing indicate that we have no preference for that capability.

When received from the server , it's used to describe the actual capabilities given to us by the WebDriver server. Here a value of Nothing indicates that the server doesn't support the capability. Thus, for Maybe Bool fields, both Nothing and Just False indicate a lack of support for the desired capability.

Constructors

Capabilities 

Fields

defaultCaps :: Capabilities Source #

Default capabilities.

Lenses

Types

Chrome

data ChromeOptions Source #

Constructors

ChromeOptions 

Fields

Lenses

Client hints

data ChromeClientHints Source #

Constructors

ChromeClientHints 

Fields

Device metrics

data ChromeDeviceMetrics Source #

Constructors

ChromeDeviceMetrics 

Fields

Extensions

Mobile emulation

data ChromeMobileEmulation Source #

Constructors

ChromeMobileEmulationSpecificDevice

Specify a known device. To enable device emulation with a specific device, the "mobileEmulation" dictionary must contain a "deviceName." Use a valid device name from the DevTools Emulated Devices settings as the value for "deviceName."

ChromeMobileEmulationIndividualAttributes

Specify individual device attributes.

Fields

Firefox

data FirefoxOptions Source #

Constructors

FirefoxOptions 

Fields

  • _firefoxOptionsBinary :: Maybe String

    Absolute path to the custom Firefox binary to use. On macOS you may either give the path to the application bundle, i.e. /Applications/Firefox.app, or the absolute path to the executable binary inside this bundle, for example /Applications/Firefox.app/Contents/MacOS/firefox-bin. geckodriver will attempt to deduce the default location of Firefox on the current system if left undefined.

  • _firefoxOptionsArgs :: Maybe [String]

    Command line arguments to pass to the Firefox binary. These must include the leading dash (-) where required, e.g. ["-headless"]. To have geckodriver pick up an existing profile on the local filesystem, you may pass ["-profile", -- "/path/to/profile"]. But if a profile has to be transferred to a target machine it is recommended to use the profile entry.

  • _firefoxOptionsProfile :: Maybe (Profile Firefox)

    Base64-encoded ZIP of a profile directory to use for the Firefox instance. This may be used to e.g. install extensions or custom certificates, but for setting custom preferences we recommend using the prefs entry instead.

  • _firefoxOptionsLog :: Maybe FirefoxLogLevel

    To increase the logging verbosity of geckodriver and Firefox, you may pass a log object that may look like {"log": {"level": "trace"}} to include all trace-level logs and above.

  • _firefoxOptionsPrefs :: Maybe Object

    Map of preference name to preference value, which can be a string, a boolean or an integer.

Lenses

Log level