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

Safe HaskellNone

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.

Constructors

HTTPStatusUnknown (Int, Int, Int) String 

newtype HTTPConnError Source

HTTP connection errors.

Constructors

HTTPConnError ConnError 

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 :: 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 :: SessionState s => String -> s FailedCommandInfoSource

Constructs a FailedCommandInfo from only an error message.

failedCommand :: SessionState s => FailedCommandType -> String -> s aSource

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