| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
WebDriverPreCore.HTTP.Protocol
Description
This module defines the Command type and related types/functions for HTTP commands referenced by the API functions in WebDriverPreCore.HTTP.API
WebDriverPreCore.HTTP.API contains functions that generate the payload for each HTTP command and is the main interface for users of this package to interact with the WebDriver HTTP protocol.
An example of using these modules to implement a basic HTTP client can be found in the test repository for this package.
Synopsis
- data Command (r :: k)
- = Get {
- description :: Text
- path :: UrlPath
- | Post {
- description :: Text
- path :: UrlPath
- body :: Object
- | PostEmpty {
- description :: Text
- path :: UrlPath
- | Delete {
- description :: Text
- path :: UrlPath
- = Get {
- mkPost :: forall {k} a (r :: k). ToJSON a => Text -> UrlPath -> a -> Command r
- mkPost' :: forall {k} a (r :: k). Text -> UrlPath -> (a -> Object) -> a -> Command r
- voidCommand :: forall {k} (a :: k). Command a -> Command ()
- loosenCommand :: forall {k} (r :: k). Command r -> Command Value
- coerceCommand :: forall {k1} {k2} (r :: k1) (r' :: k2). Command r -> Command r'
- extendPost :: forall {k} (r :: k). Command r -> Object -> Command r
- extendPostLoosen :: forall {k} (r :: k). Command r -> Object -> Command Value
- data FullCapabilities = MkFullCapabilities {}
- data Capabilities = MkCapabilities {
- browserName :: Maybe BrowserName
- browserVersion :: Maybe Text
- platformName :: Maybe PlatformName
- acceptInsecureCerts :: Maybe Bool
- pageLoadStrategy :: Maybe PageLoadStrategy
- proxy :: Maybe Proxy
- setWindowRect :: Maybe Bool
- timeouts :: Maybe Timeouts
- strictFileInteractability :: Maybe Bool
- unhandledPromptBehavior :: Maybe UnhandledPromptBehavior
- webSocketUrl :: Maybe Bool
- vendorSpecific :: Maybe VendorSpecific
- data UnhandledPromptBehavior
- data PageLoadStrategy
- data BrowserName
- = Chrome
- | Firefox
- | Safari
- | Edge
- | InternetExplorer
- data PlatformName
- data Proxy
- = Direct
- | Manual { }
- | AutoDetect
- | System
- | Pac { }
- data VendorSpecific
- = ChromeOptions {
- chromeArgs :: Maybe [Text]
- chromeBinary :: Maybe Text
- chromeExtensions :: Maybe [Text]
- chromeLocalState :: Maybe (Map Text Value)
- chromeMobileEmulation :: Maybe MobileEmulation
- chromePrefs :: Maybe (Map Text Value)
- chromeDetach :: Maybe Bool
- chromeDebuggerAddress :: Maybe Text
- chromeExcludeSwitches :: Maybe [Text]
- chromeMinidumpPath :: Maybe FilePath
- chromePerfLoggingPrefs :: Maybe PerfLoggingPrefs
- chromeWindowTypes :: Maybe [Text]
- | EdgeOptions {
- edgeArgs :: Maybe [Text]
- edgeBinary :: Maybe Text
- edgeExtensions :: Maybe [Text]
- edgeLocalState :: Maybe (Map Text Value)
- edgeMobileEmulation :: Maybe MobileEmulation
- edgePrefs :: Maybe (Map Text Value)
- edgeDetach :: Maybe Bool
- edgeDebuggerAddress :: Maybe Text
- edgeExcludeSwitches :: Maybe [Text]
- edgeMinidumpPath :: Maybe FilePath
- edgePerfLoggingPrefs :: Maybe PerfLoggingPrefs
- edgeWindowTypes :: Maybe [Text]
- | FirefoxOptions { }
- | SafariOptions { }
- = ChromeOptions {
- data SocksProxy = MkSocksProxy {
- socksProxy :: Text
- socksVersion :: Int
- data Timeouts = MkTimeouts {}
- data PerfLoggingPrefs = MkPerfLoggingPrefs {}
- data MobileEmulation = MkMobileEmulation {}
- data LogLevel
- data LogSettings = MkLogSettings {}
- data DeviceMetrics = MkDeviceMetrics {}
- alwaysMatchCapabilities :: Capabilities -> FullCapabilities
- minCapabilities :: BrowserName -> Capabilities
- minFullCapabilities :: BrowserName -> FullCapabilities
- minFirefoxCapabilities :: FullCapabilities
- minChromeCapabilities :: FullCapabilities
- data WebDriverException
- data ErrorType
- = ElementClickIntercepted
- | ElementNotInteractable
- | InsecureCertificate
- | InvalidArgument
- | InvalidCookieDomain
- | InvalidElementState
- | InvalidSelector
- | InvalidSessionId
- | JavascriptError
- | MoveTargetOutOfBounds
- | NoSuchAlert
- | NoSuchCookie
- | NoSuchElement
- | NoSuchFrame
- | NoSuchWindow
- | NoSuchShadowRoot
- | ScriptTimeout
- | SessionNotCreated
- | StaleElementReference
- | DetachedShadowRoot
- | Timeout
- | UnableToSetCookie
- | UnableToCaptureScreen
- | UnexpectedAlertOpen
- | UnknownCommand
- | UnknownError
- | UnknownMethod
- | UnsupportedOperation
- | InvalidWebExtension
- | NoSuchClientWindow
- | NoSuchHandle
- | NoSuchHistoryEntry
- | NoSuchNetworkCollector
- | NoSuchIntercept
- | NoSuchNetworkData
- | NoSuchNode
- | NoSuchRequest
- | NoSuchScript
- | NoSuchStoragePartition
- | NoSuchUserContext
- | NoSuchWebExtension
- | UnableToCloseBrowser
- | UnableToSetFileInput
- | UnavailableNetworkData
- | UnderspecifiedStoragePartition
- data JSONEncodeException = MkJSONEncodeException {
- message :: Text
- responseText :: Text
- errorDescription :: ErrorType -> Text
- toErrorType :: Text -> Either Text ErrorType
- toErrorCode :: ErrorType -> Text
- parseWebDriverException :: Text -> Value -> WebDriverException
- parseErrorType :: Value -> Maybe ErrorType
- data Cookie = MkCookie {}
- data Status = MkStatus {}
- newtype ElementId = MkElement {}
- newtype ShadowRootElementId = MkShadowRootElementId {}
- data FrameReference
- data HandleType
- data SameSite
- data Script = MkScript {}
- data Selector
- newtype Session = MkSession {}
- data SessionResponse = MkSessionResponse {
- sessionId :: Session
- webSocketUrl :: Maybe Text
- capabilities :: Capabilities
- extensions :: Maybe (Map Text Value)
- newtype Handle = MkHandle {}
- data WindowHandleSpec = HandleSpec {
- handle :: Handle
- handletype :: HandleType
- data WindowRect = Rect {}
- newtype URL = MkUrl {}
- data Action
- newtype Actions = MkActions {}
- data KeyAction
- data Pointer
- data PointerAction
- = PausePointer { }
- | Up { }
- | Down { }
- | Move { }
- | Cancel
- data PointerOrigin
- data WheelAction
Command
data Command (r :: k) Source #
The Command type is a specification for a WebDriver Http command.
Every endpoint function in this module returns a Command object which defines the HTTP method, URL path, and request body (if applicable) for the command.
The phantom type parameter r represents the expected response type for the command. In practice, this r type will always have a FromJSON instance which can be used to parse the result from the response body.
Constructors
| Get | |
Fields
| |
| Post | |
Fields
| |
| PostEmpty | |
Fields
| |
| Delete | |
Fields
| |
Constructors
The following constructors are utility functions that partially applied in WebDriverPreCore.HTTP.API to generate specific named command functions for POST requests. Although these functions form the basis of many commands in the WebDriverPreCore.HTTP.API, it would be unusual to need to use these directly.
mkPost :: forall {k} a (r :: k). ToJSON a => Text -> UrlPath -> a -> Command r Source #
Creates a Post command with the given description, path, and body.
The body parameter must be an instance of ToJSON and encode to a JSON Object type.
This function is partially applied in WebDriverPreCore.HTTP.API to generate specific named command functions.
If the body cannot be converted to a JSON Object, an error is thrown with the description included in the error message.
Fallback Constructors
The following constructors are provided to modify or create new commands that are not directly supported by the WebDriverPreCore.HTTP.API. These constructors provide a means by which users can work around defects in this package or defects in driver implementation as well as handling driver specific extensions to the HTTP protocol.
voidCommand :: forall {k} (a :: k). Command a -> Command () Source #
Changes the expected response type of a Command to (), indicating that the response should be ignored.
This is useful for commands where you only care about the side effects and not the response value.
loosenCommand :: forall {k} (r :: k). Command r -> Command Value Source #
Changes the expected response type of a Command to a generic JSON Value.
This is a specialization of coerceCommand that loosens the type constraint,
allowing you to handle responses in a more flexible way when the exact response structure is not known or not needed.
coerceCommand :: forall {k1} {k2} (r :: k1) (r' :: k2). Command r -> Command r' Source #
Changes the expected response type of a Command to a different type.
This function preserves the HTTP method, path, and request body while only changing the phantom type parameter. It can be used to adapt a command when you need a different response type than what the command originally specified.
extendPost :: forall {k} (r :: k). Command r -> Object -> Command r Source #
Extends the request body of a Post or PostEmpty command with additional fields from a JSON Object,
preserving the expected response type.
For Post commands, the additional fields are merged with the existing body.
For PostEmpty commands, the additional fields become the new body.
Attempting to use this with Get or Delete commands will result in a runtime error.
extendPostLoosen :: forall {k} (r :: k). Command r -> Object -> Command Value Source #
Extends the request body of a Post or PostEmpty command with additional fields from a JSON Object,
changing the expected response type to a generic JSON Value.
For Post commands, the additional fields are merged with the existing body.
For PostEmpty commands, the additional fields become the new body.
Attempting to use this with Get or Delete commands will result in a runtime error.
Capabilities
data FullCapabilities Source #
FullCapabilities is the object that is passed to webdriver to define the properties of the session via the newSession function.
It is a combination of alwaysMatch and firstMatch properties.
See also: Capabilities and related constructors such as minCapabilities, minFullCapabilities, minFirefoxCapabilities and minChromeCapabilities
Constructors
| MkFullCapabilities | |
Fields
| |
Instances
data Capabilities Source #
Capabilities define the properties of the session and are passed to the webdriver
via fields of the FullCapabilities object.
See also: FullCapabilities and related constructors such as: minCapabilities,
minFullCapabilities, minFirefoxCapabilities and minChromeCapabilities
Constructors
| MkCapabilities | |
Fields
| |
Instances
| FromJSON Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: Capabilities -> Value # toEncoding :: Capabilities -> Encoding # toJSONList :: [Capabilities] -> Value # toEncodingList :: [Capabilities] -> Encoding # omitField :: Capabilities -> Bool # | |||||
| Generic Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> Capabilities -> ShowS # show :: Capabilities -> String # showList :: [Capabilities] -> ShowS # | |||||
| Eq Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| type Rep Capabilities Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep Capabilities = D1 ('MetaData "Capabilities" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkCapabilities" 'PrefixI 'True) (((S1 ('MetaSel ('Just "browserName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe BrowserName)) :*: (S1 ('MetaSel ('Just "browserVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "platformName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PlatformName)))) :*: (S1 ('MetaSel ('Just "acceptInsecureCerts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "pageLoadStrategy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PageLoadStrategy)) :*: S1 ('MetaSel ('Just "proxy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Proxy))))) :*: ((S1 ('MetaSel ('Just "setWindowRect") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "timeouts") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Timeouts)) :*: S1 ('MetaSel ('Just "strictFileInteractability") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)))) :*: (S1 ('MetaSel ('Just "unhandledPromptBehavior") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe UnhandledPromptBehavior)) :*: (S1 ('MetaSel ('Just "webSocketUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "vendorSpecific") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe VendorSpecific))))))) | |||||
data UnhandledPromptBehavior Source #
Constructors
| Dismiss | |
| Accept | |
| DismissAndNotify | |
| AcceptAndNotify | |
| Ignore |
Instances
| FromJSON UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods parseJSON :: Value -> Parser UnhandledPromptBehavior # parseJSONList :: Value -> Parser [UnhandledPromptBehavior] # | |||||
| ToJSON UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: UnhandledPromptBehavior -> Value # toEncoding :: UnhandledPromptBehavior -> Encoding # toJSONList :: [UnhandledPromptBehavior] -> Value # | |||||
| Bounded UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| Enum UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods succ :: UnhandledPromptBehavior -> UnhandledPromptBehavior # pred :: UnhandledPromptBehavior -> UnhandledPromptBehavior # toEnum :: Int -> UnhandledPromptBehavior # fromEnum :: UnhandledPromptBehavior -> Int # enumFrom :: UnhandledPromptBehavior -> [UnhandledPromptBehavior] # enumFromThen :: UnhandledPromptBehavior -> UnhandledPromptBehavior -> [UnhandledPromptBehavior] # enumFromTo :: UnhandledPromptBehavior -> UnhandledPromptBehavior -> [UnhandledPromptBehavior] # enumFromThenTo :: UnhandledPromptBehavior -> UnhandledPromptBehavior -> UnhandledPromptBehavior -> [UnhandledPromptBehavior] # | |||||
| Generic UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
Methods from :: UnhandledPromptBehavior -> Rep UnhandledPromptBehavior x # to :: Rep UnhandledPromptBehavior x -> UnhandledPromptBehavior # | |||||
| Show UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> UnhandledPromptBehavior -> ShowS # show :: UnhandledPromptBehavior -> String # showList :: [UnhandledPromptBehavior] -> ShowS # | |||||
| Eq UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: UnhandledPromptBehavior -> UnhandledPromptBehavior -> Bool # (/=) :: UnhandledPromptBehavior -> UnhandledPromptBehavior -> Bool # | |||||
| type Rep UnhandledPromptBehavior Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep UnhandledPromptBehavior = D1 ('MetaData "UnhandledPromptBehavior" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "Dismiss" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Accept" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "DismissAndNotify" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "AcceptAndNotify" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Ignore" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data PageLoadStrategy Source #
Instances
| FromJSON PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods parseJSON :: Value -> Parser PageLoadStrategy # parseJSONList :: Value -> Parser [PageLoadStrategy] # | |||||
| ToJSON PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: PageLoadStrategy -> Value # toEncoding :: PageLoadStrategy -> Encoding # toJSONList :: [PageLoadStrategy] -> Value # toEncodingList :: [PageLoadStrategy] -> Encoding # omitField :: PageLoadStrategy -> Bool # | |||||
| Bounded PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| Enum PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods succ :: PageLoadStrategy -> PageLoadStrategy # pred :: PageLoadStrategy -> PageLoadStrategy # toEnum :: Int -> PageLoadStrategy # fromEnum :: PageLoadStrategy -> Int # enumFrom :: PageLoadStrategy -> [PageLoadStrategy] # enumFromThen :: PageLoadStrategy -> PageLoadStrategy -> [PageLoadStrategy] # enumFromTo :: PageLoadStrategy -> PageLoadStrategy -> [PageLoadStrategy] # enumFromThenTo :: PageLoadStrategy -> PageLoadStrategy -> PageLoadStrategy -> [PageLoadStrategy] # | |||||
| Generic PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
Methods from :: PageLoadStrategy -> Rep PageLoadStrategy x # to :: Rep PageLoadStrategy x -> PageLoadStrategy # | |||||
| Show PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> PageLoadStrategy -> ShowS # show :: PageLoadStrategy -> String # showList :: [PageLoadStrategy] -> ShowS # | |||||
| Eq PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: PageLoadStrategy -> PageLoadStrategy -> Bool # (/=) :: PageLoadStrategy -> PageLoadStrategy -> Bool # | |||||
| type Rep PageLoadStrategy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep PageLoadStrategy = D1 ('MetaData "PageLoadStrategy" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "None'" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Eager" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Normal" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data BrowserName Source #
Constructors
| Chrome | |
| Firefox | |
| Safari | |
| Edge | |
| InternetExplorer |
Instances
| FromJSON BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: BrowserName -> Value # toEncoding :: BrowserName -> Encoding # toJSONList :: [BrowserName] -> Value # toEncodingList :: [BrowserName] -> Encoding # omitField :: BrowserName -> Bool # | |||||
| Bounded BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| Enum BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods succ :: BrowserName -> BrowserName # pred :: BrowserName -> BrowserName # toEnum :: Int -> BrowserName # fromEnum :: BrowserName -> Int # enumFrom :: BrowserName -> [BrowserName] # enumFromThen :: BrowserName -> BrowserName -> [BrowserName] # enumFromTo :: BrowserName -> BrowserName -> [BrowserName] # enumFromThenTo :: BrowserName -> BrowserName -> BrowserName -> [BrowserName] # | |||||
| Generic BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> BrowserName -> ShowS # show :: BrowserName -> String # showList :: [BrowserName] -> ShowS # | |||||
| Eq BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| type Rep BrowserName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep BrowserName = D1 ('MetaData "BrowserName" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "Chrome" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Firefox" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Safari" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Edge" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "InternetExplorer" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data PlatformName Source #
Instances
| FromJSON PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: PlatformName -> Value # toEncoding :: PlatformName -> Encoding # toJSONList :: [PlatformName] -> Value # toEncodingList :: [PlatformName] -> Encoding # omitField :: PlatformName -> Bool # | |||||
| Bounded PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| Enum PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods succ :: PlatformName -> PlatformName # pred :: PlatformName -> PlatformName # toEnum :: Int -> PlatformName # fromEnum :: PlatformName -> Int # enumFrom :: PlatformName -> [PlatformName] # enumFromThen :: PlatformName -> PlatformName -> [PlatformName] # enumFromTo :: PlatformName -> PlatformName -> [PlatformName] # enumFromThenTo :: PlatformName -> PlatformName -> PlatformName -> [PlatformName] # | |||||
| Generic PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> PlatformName -> ShowS # show :: PlatformName -> String # showList :: [PlatformName] -> ShowS # | |||||
| Eq PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| type Rep PlatformName Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep PlatformName = D1 ('MetaData "PlatformName" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "Windows" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Mac" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Linux" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Android" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IOS" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
Constructors
| Direct | |
| Manual | |
| AutoDetect | |
| System | |
| Pac | |
Fields | |
data VendorSpecific Source #
Constructors
| ChromeOptions | Chrome capabilities - spec Use also for Opera - spec |
Fields
| |
| EdgeOptions | Edge capabilities - spec |
Fields
| |
| FirefoxOptions | Firefox capabilities - spec |
Fields
| |
| SafariOptions | Safari capabilities - spec |
Fields | |
Instances
| ToJSON VendorSpecific Source # | ToJSON Instance for VendorSpecific | ||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: VendorSpecific -> Value # toEncoding :: VendorSpecific -> Encoding # toJSONList :: [VendorSpecific] -> Value # toEncodingList :: [VendorSpecific] -> Encoding # omitField :: VendorSpecific -> Bool # | |||||
| Generic VendorSpecific Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
Methods from :: VendorSpecific -> Rep VendorSpecific x # to :: Rep VendorSpecific x -> VendorSpecific # | |||||
| Show VendorSpecific Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> VendorSpecific -> ShowS # show :: VendorSpecific -> String # showList :: [VendorSpecific] -> ShowS # | |||||
| Eq VendorSpecific Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: VendorSpecific -> VendorSpecific -> Bool # (/=) :: VendorSpecific -> VendorSpecific -> Bool # | |||||
| type Rep VendorSpecific Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep VendorSpecific = D1 ('MetaData "VendorSpecific" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "ChromeOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "chromeArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "chromeBinary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "chromeExtensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "chromeLocalState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text Value))) :*: (S1 ('MetaSel ('Just "chromeMobileEmulation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MobileEmulation)) :*: S1 ('MetaSel ('Just "chromePrefs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text Value)))))) :*: ((S1 ('MetaSel ('Just "chromeDetach") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "chromeDebuggerAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "chromeExcludeSwitches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "chromeMinidumpPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FilePath)) :*: (S1 ('MetaSel ('Just "chromePerfLoggingPrefs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PerfLoggingPrefs)) :*: S1 ('MetaSel ('Just "chromeWindowTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))))) :+: C1 ('MetaCons "EdgeOptions" 'PrefixI 'True) (((S1 ('MetaSel ('Just "edgeArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: (S1 ('MetaSel ('Just "edgeBinary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "edgeExtensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "edgeLocalState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text Value))) :*: (S1 ('MetaSel ('Just "edgeMobileEmulation") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe MobileEmulation)) :*: S1 ('MetaSel ('Just "edgePrefs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text Value)))))) :*: ((S1 ('MetaSel ('Just "edgeDetach") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "edgeDebuggerAddress") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "edgeExcludeSwitches") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])))) :*: (S1 ('MetaSel ('Just "edgeMinidumpPath") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe FilePath)) :*: (S1 ('MetaSel ('Just "edgePerfLoggingPrefs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe PerfLoggingPrefs)) :*: S1 ('MetaSel ('Just "edgeWindowTypes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text]))))))) :+: (C1 ('MetaCons "FirefoxOptions" 'PrefixI 'True) ((S1 ('MetaSel ('Just "firefoxArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe [Text])) :*: S1 ('MetaSel ('Just "firefoxBinary") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "firefoxProfile") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "firefoxLog") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe LogSettings)))) :+: C1 ('MetaCons "SafariOptions" 'PrefixI 'True) (S1 ('MetaSel ('Just "safariAutomaticInspection") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "safariAutomaticProfiling") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))))) | |||||
data SocksProxy Source #
Constructors
| MkSocksProxy | |
Fields
| |
Instances
| FromJSON SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: SocksProxy -> Value # toEncoding :: SocksProxy -> Encoding # toJSONList :: [SocksProxy] -> Value # toEncodingList :: [SocksProxy] -> Encoding # omitField :: SocksProxy -> Bool # | |||||
| Generic SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> SocksProxy -> ShowS # show :: SocksProxy -> String # showList :: [SocksProxy] -> ShowS # | |||||
| Eq SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| type Rep SocksProxy Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep SocksProxy = D1 ('MetaData "SocksProxy" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkSocksProxy" 'PrefixI 'True) (S1 ('MetaSel ('Just "socksProxy") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "socksVersion") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int))) | |||||
Timeouts in milliseconds spec
Instances
| FromJSON Timeouts Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON Timeouts Source # | |||||
| Generic Timeouts Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show Timeouts Source # | |||||
| Eq Timeouts Source # | |||||
| type Rep Timeouts Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep Timeouts = D1 ('MetaData "Timeouts" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkTimeouts" 'PrefixI 'True) (S1 ('MetaSel ('Just "implicit") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: (S1 ('MetaSel ('Just "pageLoad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)) :*: S1 ('MetaSel ('Just "script") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int))))) | |||||
data PerfLoggingPrefs Source #
Constructors
| MkPerfLoggingPrefs | |
Fields | |
Instances
| FromJSON PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods parseJSON :: Value -> Parser PerfLoggingPrefs # parseJSONList :: Value -> Parser [PerfLoggingPrefs] # | |||||
| ToJSON PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: PerfLoggingPrefs -> Value # toEncoding :: PerfLoggingPrefs -> Encoding # toJSONList :: [PerfLoggingPrefs] -> Value # toEncodingList :: [PerfLoggingPrefs] -> Encoding # omitField :: PerfLoggingPrefs -> Bool # | |||||
| Generic PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
Methods from :: PerfLoggingPrefs -> Rep PerfLoggingPrefs x # to :: Rep PerfLoggingPrefs x -> PerfLoggingPrefs # | |||||
| Show PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> PerfLoggingPrefs -> ShowS # show :: PerfLoggingPrefs -> String # showList :: [PerfLoggingPrefs] -> ShowS # | |||||
| Eq PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: PerfLoggingPrefs -> PerfLoggingPrefs -> Bool # (/=) :: PerfLoggingPrefs -> PerfLoggingPrefs -> Bool # | |||||
| type Rep PerfLoggingPrefs Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep PerfLoggingPrefs = D1 ('MetaData "PerfLoggingPrefs" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkPerfLoggingPrefs" 'PrefixI 'True) ((S1 ('MetaSel ('Just "enableNetwork") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: S1 ('MetaSel ('Just "enablePage") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool))) :*: (S1 ('MetaSel ('Just "enableTimeline") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Bool)) :*: (S1 ('MetaSel ('Just "traceCategories") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: S1 ('MetaSel ('Just "bufferUsageReportingInterval") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Int)))))) | |||||
data MobileEmulation Source #
Constructors
| MkMobileEmulation | |
Fields
| |
Instances
| FromJSON MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods parseJSON :: Value -> Parser MobileEmulation # parseJSONList :: Value -> Parser [MobileEmulation] # | |||||
| ToJSON MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: MobileEmulation -> Value # toEncoding :: MobileEmulation -> Encoding # toJSONList :: [MobileEmulation] -> Value # toEncodingList :: [MobileEmulation] -> Encoding # omitField :: MobileEmulation -> Bool # | |||||
| Generic MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
Methods from :: MobileEmulation -> Rep MobileEmulation x # to :: Rep MobileEmulation x -> MobileEmulation # | |||||
| Show MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> MobileEmulation -> ShowS # show :: MobileEmulation -> String # showList :: [MobileEmulation] -> ShowS # | |||||
| Eq MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: MobileEmulation -> MobileEmulation -> Bool # (/=) :: MobileEmulation -> MobileEmulation -> Bool # | |||||
| type Rep MobileEmulation Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep MobileEmulation = D1 ('MetaData "MobileEmulation" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkMobileEmulation" 'PrefixI 'True) (S1 ('MetaSel ('Just "deviceName") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "deviceMetrics") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe DeviceMetrics)) :*: S1 ('MetaSel ('Just "userAgent") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))))) | |||||
Browser log levels as defined in vendor specs
Constructors
| Trace | Most verbose logging |
| Debug | Debug-level information |
| Config | Configuration details |
| Info | General operational logs |
| Warning | Potential issues |
| Error | Recoverable errors |
| Fatal | Critical failures |
| Off | No logging |
Instances
| FromJSON LogLevel Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON LogLevel Source # | |||||
| Bounded LogLevel Source # | |||||
| Enum LogLevel Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| Generic LogLevel Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show LogLevel Source # | |||||
| Eq LogLevel Source # | |||||
| type Rep LogLevel Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep LogLevel = D1 ('MetaData "LogLevel" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (((C1 ('MetaCons "Trace" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Debug" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Config" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Info" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "Warning" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Error" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Fatal" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Off" 'PrefixI 'False) (U1 :: Type -> Type)))) | |||||
data LogSettings Source #
Log settings structure for vendor capabilities
Constructors
| MkLogSettings | |
Instances
| FromJSON LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| ToJSON LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: LogSettings -> Value # toEncoding :: LogSettings -> Encoding # toJSONList :: [LogSettings] -> Value # toEncodingList :: [LogSettings] -> Encoding # omitField :: LogSettings -> Bool # | |||||
| Generic LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> LogSettings -> ShowS # show :: LogSettings -> String # showList :: [LogSettings] -> ShowS # | |||||
| Eq LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities | |||||
| type Rep LogSettings Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep LogSettings = D1 ('MetaData "LogSettings" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkLogSettings" 'PrefixI 'True) (S1 ('MetaSel ('Just "level") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 LogLevel))) | |||||
data DeviceMetrics Source #
Constructors
| MkDeviceMetrics | |
Instances
| FromJSON DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods parseJSON :: Value -> Parser DeviceMetrics # parseJSONList :: Value -> Parser [DeviceMetrics] # | |||||
| ToJSON DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods toJSON :: DeviceMetrics -> Value # toEncoding :: DeviceMetrics -> Encoding # toJSONList :: [DeviceMetrics] -> Value # toEncodingList :: [DeviceMetrics] -> Encoding # omitField :: DeviceMetrics -> Bool # | |||||
| Generic DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Associated Types
| |||||
| Show DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods showsPrec :: Int -> DeviceMetrics -> ShowS # show :: DeviceMetrics -> String # showList :: [DeviceMetrics] -> ShowS # | |||||
| Eq DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities Methods (==) :: DeviceMetrics -> DeviceMetrics -> Bool # (/=) :: DeviceMetrics -> DeviceMetrics -> Bool # | |||||
| type Rep DeviceMetrics Source # | |||||
Defined in WebDriverPreCore.HTTP.Capabilities type Rep DeviceMetrics = D1 ('MetaData "DeviceMetrics" "WebDriverPreCore.HTTP.Capabilities" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkDeviceMetrics" 'PrefixI 'True) ((S1 ('MetaSel ('Just "width") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "height") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "pixelRatio") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Double) :*: S1 ('MetaSel ('Just "touch") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool)))) | |||||
Capability Utility Functions
alwaysMatchCapabilities :: Capabilities -> FullCapabilities Source #
Returns the minimal FullCapabilities object where the firstMatch property is empty.
It is very common for alwaysMatch to be the only field populated and the firstMatch field to be empty.
minCapabilities :: BrowserName -> Capabilities Source #
Returns the minimal Capabilities object for a given browser The browserName is the only field populated spec
minFullCapabilities :: BrowserName -> FullCapabilities Source #
Returns the minimal FullCapabilities object for a given browser
The browserName in the alwaysMatch field is the only field populated
spec
minFirefoxCapabilities :: FullCapabilities Source #
Returns the minimal FullCapabilities object for Firefox
minChromeCapabilities :: FullCapabilities Source #
Returns the minimal FullCapabilities object for Chrome
Error
data WebDriverException Source #
Constructors
| ResponseParseException | |
| UnrecognisedErrorTypeException | |
| JSONEncodeException JSONEncodeException | |
| ProtocolException | |
Instances
| Exception WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error Methods toException :: WebDriverException -> SomeException # fromException :: SomeException -> Maybe WebDriverException # | |||||
| Generic WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error Associated Types
Methods from :: WebDriverException -> Rep WebDriverException x # to :: Rep WebDriverException x -> WebDriverException # | |||||
| Show WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error Methods showsPrec :: Int -> WebDriverException -> ShowS # show :: WebDriverException -> String # showList :: [WebDriverException] -> ShowS # | |||||
| Eq WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error Methods (==) :: WebDriverException -> WebDriverException -> Bool # (/=) :: WebDriverException -> WebDriverException -> Bool # | |||||
| Ord WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error Methods compare :: WebDriverException -> WebDriverException -> Ordering # (<) :: WebDriverException -> WebDriverException -> Bool # (<=) :: WebDriverException -> WebDriverException -> Bool # (>) :: WebDriverException -> WebDriverException -> Bool # (>=) :: WebDriverException -> WebDriverException -> Bool # max :: WebDriverException -> WebDriverException -> WebDriverException # min :: WebDriverException -> WebDriverException -> WebDriverException # | |||||
| type Rep WebDriverException Source # | |||||
Defined in WebDriverPreCore.Error type Rep WebDriverException = D1 ('MetaData "WebDriverException" "WebDriverPreCore.Error" "webdriver-precore-0.2.0.0-inplace" 'False) ((C1 ('MetaCons "ResponseParseException" 'PrefixI 'True) (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "response") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Value)) :+: C1 ('MetaCons "UnrecognisedErrorTypeException" 'PrefixI 'True) (S1 ('MetaSel ('Just "errorType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "response") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Value))) :+: (C1 ('MetaCons "JSONEncodeException" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 JSONEncodeException)) :+: C1 ('MetaCons "ProtocolException" 'PrefixI 'True) ((S1 ('MetaSel ('Just "error") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 ErrorType) :*: (S1 ('MetaSel ('Just "description") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) :*: (S1 ('MetaSel ('Just "stacktrace") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text)) :*: (S1 ('MetaSel ('Just "errorData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Value)) :*: S1 ('MetaSel ('Just "response") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Value)))))) | |||||
Known WevDriver Error Types
Constructors
| ElementClickIntercepted | |
| ElementNotInteractable | |
| InsecureCertificate | |
| InvalidArgument | |
| InvalidCookieDomain | |
| InvalidElementState | |
| InvalidSelector | |
| InvalidSessionId | |
| JavascriptError | |
| MoveTargetOutOfBounds | |
| NoSuchAlert | |
| NoSuchCookie | |
| NoSuchElement | |
| NoSuchFrame | |
| NoSuchWindow | |
| NoSuchShadowRoot | |
| ScriptTimeout | |
| SessionNotCreated | |
| StaleElementReference | |
| DetachedShadowRoot | |
| Timeout | |
| UnableToSetCookie | |
| UnableToCaptureScreen | |
| UnexpectedAlertOpen | |
| UnknownCommand | |
| UnknownError | |
| UnknownMethod | |
| UnsupportedOperation | |
| InvalidWebExtension | |
| NoSuchClientWindow | |
| NoSuchHandle | |
| NoSuchHistoryEntry | |
| NoSuchNetworkCollector | |
| NoSuchIntercept | |
| NoSuchNetworkData | |
| NoSuchNode | |
| NoSuchRequest | |
| NoSuchScript | |
| NoSuchStoragePartition | |
| NoSuchUserContext | |
| NoSuchWebExtension | |
| UnableToCloseBrowser | |
| UnableToSetFileInput | |
| UnavailableNetworkData | |
| UnderspecifiedStoragePartition |
Instances
| FromJSON ErrorType Source # | |
Defined in WebDriverPreCore.Error | |
| Bounded ErrorType Source # | |
| Enum ErrorType Source # | |
Defined in WebDriverPreCore.Error Methods succ :: ErrorType -> ErrorType # pred :: ErrorType -> ErrorType # fromEnum :: ErrorType -> Int # enumFrom :: ErrorType -> [ErrorType] # enumFromThen :: ErrorType -> ErrorType -> [ErrorType] # enumFromTo :: ErrorType -> ErrorType -> [ErrorType] # enumFromThenTo :: ErrorType -> ErrorType -> ErrorType -> [ErrorType] # | |
| Read ErrorType Source # | |
| Show ErrorType Source # | |
| Eq ErrorType Source # | |
| Ord ErrorType Source # | |
data JSONEncodeException Source #
Constructors
| MkJSONEncodeException | |
Fields
| |
Instances
| FromJSON JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error Methods parseJSON :: Value -> Parser JSONEncodeException # parseJSONList :: Value -> Parser [JSONEncodeException] # | |||||
| Generic JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error Associated Types
Methods from :: JSONEncodeException -> Rep JSONEncodeException x # to :: Rep JSONEncodeException x -> JSONEncodeException # | |||||
| Show JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error Methods showsPrec :: Int -> JSONEncodeException -> ShowS # show :: JSONEncodeException -> String # showList :: [JSONEncodeException] -> ShowS # | |||||
| Eq JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error Methods (==) :: JSONEncodeException -> JSONEncodeException -> Bool # (/=) :: JSONEncodeException -> JSONEncodeException -> Bool # | |||||
| Ord JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error Methods compare :: JSONEncodeException -> JSONEncodeException -> Ordering # (<) :: JSONEncodeException -> JSONEncodeException -> Bool # (<=) :: JSONEncodeException -> JSONEncodeException -> Bool # (>) :: JSONEncodeException -> JSONEncodeException -> Bool # (>=) :: JSONEncodeException -> JSONEncodeException -> Bool # max :: JSONEncodeException -> JSONEncodeException -> JSONEncodeException # min :: JSONEncodeException -> JSONEncodeException -> JSONEncodeException # | |||||
| type Rep JSONEncodeException Source # | |||||
Defined in WebDriverPreCore.Error type Rep JSONEncodeException = D1 ('MetaData "JSONEncodeException" "WebDriverPreCore.Error" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkJSONEncodeException" 'PrefixI 'True) (S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "responseText") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) | |||||
errorDescription :: ErrorType -> Text Source #
toErrorCode :: ErrorType -> Text Source #
Core Types
Constructors
| MkCookie | |
Instances
| FromJSON Status Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| ToJSON Status Source # | |||||
| Generic Status Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show Status Source # | |||||
| Eq Status Source # | |||||
| type Rep Status Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep Status = D1 ('MetaData "Status" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkStatus" 'PrefixI 'True) (S1 ('MetaSel ('Just "ready") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Bool) :*: S1 ('MetaSel ('Just "message") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text))) | |||||
Instances
| FromJSON ElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| ToJSON ElementId Source # | |||||
| Generic ElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show ElementId Source # | |||||
| Eq ElementId Source # | |||||
| type Rep ElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
newtype ShadowRootElementId Source #
Constructors
| MkShadowRootElementId | |
Instances
| FromJSON ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods parseJSON :: Value -> Parser ShadowRootElementId # parseJSONList :: Value -> Parser [ShadowRootElementId] # | |||||
| ToJSON ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: ShadowRootElementId -> Value # toEncoding :: ShadowRootElementId -> Encoding # toJSONList :: [ShadowRootElementId] -> Value # toEncodingList :: [ShadowRootElementId] -> Encoding # omitField :: ShadowRootElementId -> Bool # | |||||
| Generic ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
Methods from :: ShadowRootElementId -> Rep ShadowRootElementId x # to :: Rep ShadowRootElementId x -> ShadowRootElementId # | |||||
| Show ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> ShadowRootElementId -> ShowS # show :: ShadowRootElementId -> String # showList :: [ShadowRootElementId] -> ShowS # | |||||
| Eq ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: ShadowRootElementId -> ShadowRootElementId -> Bool # (/=) :: ShadowRootElementId -> ShadowRootElementId -> Bool # | |||||
| type Rep ShadowRootElementId Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep ShadowRootElementId = D1 ('MetaData "ShadowRootElementId" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'True) (C1 ('MetaCons "MkShadowRootElementId" 'PrefixI 'True) (S1 ('MetaSel ('Just "id") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) | |||||
data FrameReference Source #
Constructors
| TopLevelFrame | |
| FrameNumber Word16 | |
| FrameElementId ElementId |
Instances
| ToJSON FrameReference Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: FrameReference -> Value # toEncoding :: FrameReference -> Encoding # toJSONList :: [FrameReference] -> Value # toEncodingList :: [FrameReference] -> Encoding # omitField :: FrameReference -> Bool # | |
| Show FrameReference Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> FrameReference -> ShowS # show :: FrameReference -> String # showList :: [FrameReference] -> ShowS # | |
| Eq FrameReference Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: FrameReference -> FrameReference -> Bool # (/=) :: FrameReference -> FrameReference -> Bool # | |
data HandleType Source #
Instances
| FromJSON HandleType Source # | |
Defined in WebDriverPreCore.HTTP.Protocol | |
| ToJSON HandleType Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: HandleType -> Value # toEncoding :: HandleType -> Encoding # toJSONList :: [HandleType] -> Value # toEncodingList :: [HandleType] -> Encoding # omitField :: HandleType -> Bool # | |
| Show HandleType Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> HandleType -> ShowS # show :: HandleType -> String # showList :: [HandleType] -> ShowS # | |
| Eq HandleType Source # | |
Defined in WebDriverPreCore.HTTP.Protocol | |
Instances
| FromJSON SameSite Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| ToJSON SameSite Source # | |||||
| Generic SameSite Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show SameSite Source # | |||||
| Eq SameSite Source # | |||||
| Ord SameSite Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| type Rep SameSite Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep SameSite = D1 ('MetaData "SameSite" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Lax" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Strict" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "None" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Instances
| ToJSON Script Source # | |||||
| Generic Script Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show Script Source # | |||||
| Eq Script Source # | |||||
| type Rep Script Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep Script = D1 ('MetaData "Script" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkScript" 'PrefixI 'True) (S1 ('MetaSel ('Just "script") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Text) :*: S1 ('MetaSel ('Just "args") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Value]))) | |||||
data SessionResponse Source #
Constructors
| MkSessionResponse | |
Fields
| |
Instances
| FromJSON SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods parseJSON :: Value -> Parser SessionResponse # parseJSONList :: Value -> Parser [SessionResponse] # | |||||
| ToJSON SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: SessionResponse -> Value # toEncoding :: SessionResponse -> Encoding # toJSONList :: [SessionResponse] -> Value # toEncodingList :: [SessionResponse] -> Encoding # omitField :: SessionResponse -> Bool # | |||||
| Generic SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
Methods from :: SessionResponse -> Rep SessionResponse x # to :: Rep SessionResponse x -> SessionResponse # | |||||
| Show SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> SessionResponse -> ShowS # show :: SessionResponse -> String # showList :: [SessionResponse] -> ShowS # | |||||
| Eq SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: SessionResponse -> SessionResponse -> Bool # (/=) :: SessionResponse -> SessionResponse -> Bool # | |||||
| type Rep SessionResponse Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep SessionResponse = D1 ('MetaData "SessionResponse" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "MkSessionResponse" 'PrefixI 'True) ((S1 ('MetaSel ('Just "sessionId") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Session) :*: S1 ('MetaSel ('Just "webSocketUrl") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe Text))) :*: (S1 ('MetaSel ('Just "capabilities") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Capabilities) :*: S1 ('MetaSel ('Just "extensions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Map Text Value)))))) | |||||
Instances
| FromJSON Handle Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| ToJSON Handle Source # | |||||
| Generic Handle Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show Handle Source # | |||||
| Eq Handle Source # | |||||
| type Rep Handle Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
data WindowHandleSpec Source #
Constructors
| HandleSpec | |
Fields
| |
Instances
| FromJSON WindowHandleSpec Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods parseJSON :: Value -> Parser WindowHandleSpec # parseJSONList :: Value -> Parser [WindowHandleSpec] # | |
| ToJSON WindowHandleSpec Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: WindowHandleSpec -> Value # toEncoding :: WindowHandleSpec -> Encoding # toJSONList :: [WindowHandleSpec] -> Value # toEncodingList :: [WindowHandleSpec] -> Encoding # omitField :: WindowHandleSpec -> Bool # | |
| Show WindowHandleSpec Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> WindowHandleSpec -> ShowS # show :: WindowHandleSpec -> String # showList :: [WindowHandleSpec] -> ShowS # | |
| Eq WindowHandleSpec Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: WindowHandleSpec -> WindowHandleSpec -> Bool # (/=) :: WindowHandleSpec -> WindowHandleSpec -> Bool # | |
data WindowRect Source #
Instances
| FromJSON WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| ToJSON WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: WindowRect -> Value # toEncoding :: WindowRect -> Encoding # toJSONList :: [WindowRect] -> Value # toEncodingList :: [WindowRect] -> Encoding # omitField :: WindowRect -> Bool # | |||||
| Generic WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Associated Types
| |||||
| Show WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> WindowRect -> ShowS # show :: WindowRect -> String # showList :: [WindowRect] -> ShowS # | |||||
| Eq WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol | |||||
| type Rep WindowRect Source # | |||||
Defined in WebDriverPreCore.HTTP.Protocol type Rep WindowRect = D1 ('MetaData "WindowRect" "WebDriverPreCore.HTTP.Protocol" "webdriver-precore-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Rect" 'PrefixI 'True) ((S1 ('MetaSel ('Just "x") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "y") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)) :*: (S1 ('MetaSel ('Just "width") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "height") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))) | |||||
Action Types
Constructors
| NoneAction | |
Fields
| |
| Key | |
Fields
| |
| Pointer | |
| Wheel | |
Fields
| |
data PointerAction Source #
Constructors
| PausePointer | |
| Up | |
| Down | |
| Move | |
| Cancel | |
Instances
| ToJSON PointerAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: PointerAction -> Value # toEncoding :: PointerAction -> Encoding # toJSONList :: [PointerAction] -> Value # toEncodingList :: [PointerAction] -> Encoding # omitField :: PointerAction -> Bool # | |
| Show PointerAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> PointerAction -> ShowS # show :: PointerAction -> String # showList :: [PointerAction] -> ShowS # | |
| Eq PointerAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: PointerAction -> PointerAction -> Bool # (/=) :: PointerAction -> PointerAction -> Bool # | |
data PointerOrigin Source #
Constructors
| Viewport | |
| OriginPointer | |
| OriginElement ElementId |
Instances
| ToJSON PointerOrigin Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: PointerOrigin -> Value # toEncoding :: PointerOrigin -> Encoding # toJSONList :: [PointerOrigin] -> Value # toEncodingList :: [PointerOrigin] -> Encoding # omitField :: PointerOrigin -> Bool # | |
| Show PointerOrigin Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> PointerOrigin -> ShowS # show :: PointerOrigin -> String # showList :: [PointerOrigin] -> ShowS # | |
| Eq PointerOrigin Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods (==) :: PointerOrigin -> PointerOrigin -> Bool # (/=) :: PointerOrigin -> PointerOrigin -> Bool # | |
data WheelAction Source #
Constructors
| PauseWheel | |
| Scroll | |
Instances
| ToJSON WheelAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods toJSON :: WheelAction -> Value # toEncoding :: WheelAction -> Encoding # toJSONList :: [WheelAction] -> Value # toEncodingList :: [WheelAction] -> Encoding # omitField :: WheelAction -> Bool # | |
| Show WheelAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol Methods showsPrec :: Int -> WheelAction -> ShowS # show :: WheelAction -> String # showList :: [WheelAction] -> ShowS # | |
| Eq WheelAction Source # | |
Defined in WebDriverPreCore.HTTP.Protocol | |