| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
Test.WebDriver.Capabilities
- class GetCapabilities t where
- getCaps :: t -> Capabilities
- class SetCapabilities t where
- setCaps :: Capabilities -> t -> t
- type HasCapabilities t = (GetCapabilities t, SetCapabilities t)
- modifyCaps :: HasCapabilities t => (Capabilities -> Capabilities) -> t -> t
- useBrowser :: HasCapabilities t => Browser -> t -> t
- useVersion :: HasCapabilities t => String -> t -> t
- usePlatform :: HasCapabilities t => Platform -> t -> t
- useProxy :: HasCapabilities t => ProxyType -> t -> t
- data Capabilities = Capabilities {
- browser :: Browser
- version :: Maybe String
- platform :: Platform
- proxy :: ProxyType
- javascriptEnabled :: Maybe Bool
- takesScreenshot :: Maybe Bool
- handlesAlerts :: Maybe Bool
- databaseEnabled :: Maybe Bool
- locationContextEnabled :: Maybe Bool
- applicationCacheEnabled :: Maybe Bool
- browserConnectionEnabled :: Maybe Bool
- cssSelectorsEnabled :: Maybe Bool
- webStorageEnabled :: Maybe Bool
- rotatable :: Maybe Bool
- acceptSSLCerts :: Maybe Bool
- nativeEvents :: Maybe Bool
- unexpectedAlertBehavior :: Maybe UnexpectedAlertBehavior
- additionalCaps :: [Pair]
- defaultCaps :: Capabilities
- allCaps :: Capabilities
- data Browser
- = Firefox { }
- | Chrome { }
- | IE {
- ieIgnoreProtectedModeSettings :: Bool
- ieIgnoreZoomSetting :: Bool
- ieInitialBrowserUrl :: Maybe Text
- ieElementScrollBehavior :: IEElementScrollBehavior
- ieEnablePersistentHover :: Bool
- ieEnableElementCacheCleanup :: Bool
- ieRequireWindowFocus :: Bool
- ieBrowserAttachTimeout :: Integer
- ieLogFile :: Maybe FilePath
- ieLogLevel :: IELogLevel
- ieHost :: Maybe Text
- ieExtractPath :: Maybe Text
- ieSilent :: Bool
- ieForceCreateProcess :: Bool
- ieSwitches :: Maybe Text
- | Opera {
- operaBinary :: Maybe FilePath
- operaProduct :: Maybe String
- operaDetach :: Bool
- operaAutoStart :: Bool
- operaIdle :: Bool
- operaDisplay :: Maybe Int
- operaLauncher :: Maybe FilePath
- operaPort :: Maybe Word16
- operaHost :: Maybe String
- operaOptions :: Maybe String
- operaLogFile :: Maybe FilePath
- operaLogPref :: LogLevel
- | HTMLUnit
- | IPhone
- | IPad
- | Android
- | Browser Text
- firefox :: Browser
- chrome :: Browser
- ie :: Browser
- opera :: Browser
- htmlUnit :: Browser
- iPhone :: Browser
- iPad :: Browser
- android :: Browser
- data Platform
- data ProxyType
- = NoProxy
- | UseSystemSettings
- | AutoDetect
- | PAC { }
- | Manual { }
- data UnexpectedAlertBehavior
- data LogLevel
- data IELogLevel
- data IEElementScrollBehavior
Documentation
class GetCapabilities t where Source
A typeclass for readable Capabilities
Methods
getCaps :: t -> Capabilities Source
class SetCapabilities t where Source
A typeclass for writable Capabilities
Methods
setCaps :: Capabilities -> t -> t Source
Instances
type HasCapabilities t = (GetCapabilities t, SetCapabilities t) Source
Read/write Capabilities
modifyCaps :: HasCapabilities t => (Capabilities -> Capabilities) -> t -> t Source
Modifies the wdCapabilities field of a WDConfig by applying the given function. Overloaded to work with any HasCapabilities instance.
useBrowser :: HasCapabilities t => Browser -> t -> t Source
A helper function for setting the browser capability of a HasCapabilities instance
useVersion :: HasCapabilities t => String -> t -> t Source
A helper function for setting the version capability of a HasCapabilities instance
usePlatform :: HasCapabilities t => Platform -> t -> t Source
A helper function for setting the platform capability of a HasCapabilities instance
useProxy :: HasCapabilities t => ProxyType -> t -> t Source
A helper function for setting the useProxy capability of a HasCapabilities instance
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
| |
allCaps :: Capabilities Source
Same as defaultCaps, but with all Maybe Bool capabilities set to
Just True.
This constructor simultaneously specifies which browser the session will
use, while also providing browser-specific configuration. Default
configuration is provided for each browser by firefox, chrome, opera,
ie, etc.
This library uses firefox as its Default browser configuration, when no
browser choice is specified.
Constructors
| Firefox | |
Fields
| |
| Chrome | |
Fields
| |
| IE | |
Fields
| |
| Opera | |
Fields
| |
| HTMLUnit | |
| IPhone | |
| IPad | |
| Android | |
| Browser Text | some other browser, specified by a string name |
Default Firefox settings. All Maybe fields are set to Nothing. ffLogPref
is set to LogInfo.
Default Chrome settings. All Maybe fields are set to Nothing, no options are specified, and no extensions are used.
Default IE settings. See the IE constructor for more details on
individual defaults
Default Opera settings. See the Opera constructor for more details on
individual defaults.
Represents platform options supported by WebDriver. The value Any represents no preference.
Available settings for the proxy Capabilities field
Constructors
| NoProxy | |
| UseSystemSettings | |
| AutoDetect | |
| PAC | Use a proxy auto-config file specified by URL |
Fields | |
| Manual | Manually specify proxy hosts as hostname:port strings. Note that behavior is undefined for empty strings. |
data IELogLevel Source
Logging levels for Internet Explorer
Constructors
| IELogTrace | |
| IELogDebug | |
| IELogInfo | |
| IELogWarn | |
| IELogError | |
| IELogFatal |
data IEElementScrollBehavior Source
Specifies how elements scroll into the viewport. (see ieElementScrollBehavior)
Constructors
| AlignTop | |
| AlignBottom |
Instances