Safe Haskell | None |
---|
- class SessionState wd => WebDriver wd where
- doCommand :: (ToJSON a, FromJSON b) => RequestMethod -> Text -> a -> wd b
- data RequestMethod
- class MonadBaseControl IO s => SessionState s where
- getSession :: s WDSession
- putSession :: WDSession -> s ()
- modifySession :: SessionState s => (WDSession -> WDSession) -> s ()
- data WDSession = WDSession {}
- newtype SessionId = SessionId Text
- defaultSession :: WDSession
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.
getSession :: s WDSessionSource
putSession :: WDSession -> s ()Source
SessionState WD | |
SessionState m => SessionState (IdentityT m) | |
SessionState m => SessionState (MaybeT m) | |
(Error e, SessionState m) => SessionState (ErrorT e m) | |
SessionState m => SessionState (ReaderT r m) | |
SessionState m => SessionState (StateT s m) | |
SessionState m => SessionState (StateT s m) | |
(Monoid w, SessionState m) => SessionState (WriterT w m) | |
(Monoid w, SessionState m) => SessionState (RWST r w s m) | |
(Monoid w, SessionState m) => SessionState (RWST r w s m) |
modifySession :: SessionState s => (WDSession -> WDSession) -> s ()Source
WebDriver sessions
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.
WDSession | |
|
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.
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.