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

Safe HaskellNone




WebDriver class

class SessionState wd => WebDriver wd whereSource

A class for monads that can handle wire protocol requests. This is the operation underlying all of the high-level commands exported in Test.WebDriver.Commands. For more information on the wire protocol see http://code.google.com/p/selenium/wiki/JsonWireProtocol




:: (ToJSON a, FromJSON b) 
=> RequestMethod

HTTP request method

-> Text

URL of request

-> a

JSON parameters passed in the body of the request. Note that, as a special case, () will result in an empty request body.

-> wd b

The JSON result of the HTTP request.


WebDriver WD 
WebDriver wd => WebDriver (IdentityT wd) 
WebDriver wd => WebDriver (MaybeT wd) 
(Error e, WebDriver wd) => WebDriver (ErrorT e wd) 
WebDriver wd => WebDriver (ReaderT r wd) 
WebDriver wd => WebDriver (StateT s wd) 
WebDriver wd => WebDriver (StateT s wd) 
(Monoid w, WebDriver wd) => WebDriver (WriterT w wd) 
(Monoid w, WebDriver wd) => WebDriver (RWST r w s wd) 
(Monoid w, WebDriver wd) => WebDriver (RWST r w s wd) 

data RequestMethod

The HTTP request method, to be used in the Request object. We are missing a few of the stranger methods, but these are not really necessary until we add full TLS.

SessionState class

class MonadBaseControl IO s => SessionState s whereSource

A class for monads that carry a WebDriver session with them. The MonadBaseControl superclass is used for exception handling through the lifted-base package.

WebDriver sessions

data WDSession Source

Information about a WebDriver session. This structure is passed implicitly through all WD computations, and is also used to configure the WD monad before execution.




wdHost :: String

Host name of the WebDriver server for this session

wdPort :: Word16

Port number of the server

wdSessId :: Maybe SessionId

An opaque reference identifying the session to use with WD commands. A value of Nothing indicates that a session hasn't been created yet. Sessions can be created within WD via createSession, or created and closed automatically with runSession

newtype SessionId Source

An opaque identifier for a WebDriver session. These handles are produced by the server on session creation, and act to identify a session in progress.


SessionId Text 

defaultSession :: WDSessionSource

A default session connects to localhost on port 4444, and hasn't been initialized server-side. This value is the same as def but with a less polymorphic type.