| Safe Haskell | None |
|---|
Test.WebDriver.Classes
Contents
- 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
- doSessCommand :: (WebDriver wd, ToJSON a, FromJSON b) => RequestMethod -> Text -> a -> wd b
- newtype NoSessionId = NoSessionId String
Documentation
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
Methods
Arguments
| :: (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 |
Instances
| WebDriver WD | |
| WebDriver wd => WebDriver (MaybeT wd) | |
| WebDriver wd => WebDriver (IdentityT 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.
Instances
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.
Instances
| SessionState WD | |
| SessionState m => SessionState (MaybeT m) | |
| SessionState m => SessionState (IdentityT 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
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.
Constructors
| WDSession | |
Fields
| |
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.
doSessCommand :: (WebDriver wd, ToJSON a, FromJSON b) => RequestMethod -> Text -> a -> wd bSource
No Session Exception
newtype NoSessionId Source
A command requiring a session ID was attempted when no session ID was available.
Constructors
| NoSessionId String |