webdriver-0.6.2.1: a Haskell client for the Selenium WebDriver protocol

Safe HaskellNone
LanguageHaskell98

Test.WebDriver.Exceptions

Synopsis

Documentation

newtype InvalidURL Source

An invalid URL was given

Constructors

InvalidURL String 

newtype NoSessionId Source

A command requiring a session ID was attempted when no session ID was available.

Constructors

NoSessionId String 

newtype BadJSON Source

An error occured when parsing a JSON value.

Constructors

BadJSON String 

data HTTPStatusUnknown Source

An unexpected HTTP status was sent by the server.

newtype UnknownCommand Source

A command was sent to the WebDriver server that it didn't recognize.

Constructors

UnknownCommand String 

newtype ServerError Source

A server-side exception occured

Constructors

ServerError String 

data FailedCommand Source

This exception encapsulates a broad variety of exceptions that can occur when a command fails.

data FailedCommandInfo Source

Detailed information about the failed command provided by the server.

Constructors

FailedCommandInfo 

Fields

errMsg :: String

The error message.

errSess :: Maybe WDSession

The session associated with the exception.

errScreen :: Maybe ByteString

A screen shot of the focused window when the exception occured, if provided.

errClass :: Maybe String

The "class" in which the exception was raised, if provided.

errStack :: [StackFrame]

A stack trace of the exception.

Instances

Show FailedCommandInfo

Provides a readable printout of the error information, useful for logging.

FromJSON FailedCommandInfo 

data StackFrame Source

An individual stack frame from the stack trace provided by the server during a FailedCommand.

mkFailedCommandInfo :: WDSessionState s => String -> s FailedCommandInfo Source

Constructs a FailedCommandInfo from only an error message.

failedCommand :: WDSessionState s => FailedCommandType -> String -> s a Source

Convenience function to throw a FailedCommand locally with no server-side info present.