Safe Haskell | None |
---|---|
Language | Haskell98 |
- class (Monad m, Applicative m) => WDSessionState m where
- getSession :: m WDSession
- putSession :: WDSession -> m ()
- type WDSessionStateIO s = (WDSessionState s, MonadBase IO s)
- type WDSessionStateControl s = (WDSessionState s, MonadBaseControl IO s)
- modifySession :: WDSessionState s => (WDSession -> WDSession) -> s ()
- withSession :: WDSessionStateControl m => WDSession -> m a -> m a
- data WDSession = WDSession {}
- mkSession :: MonadBase IO m => WDConfig -> m WDSession
- mostRecentHistory :: WDSession -> Maybe SessionHistory
- mostRecentHTTPRequest :: WDSession -> Maybe Request
- newtype SessionId = SessionId Text
- data SessionHistory = SessionHistory {}
- type SessionHistoryConfig = SessionHistory -> [SessionHistory] -> [SessionHistory]
- noHistory :: SessionHistoryConfig
- unlimitedHistory :: SessionHistoryConfig
- onlyMostRecentHistory :: SessionHistoryConfig
WDSessionState class
class (Monad m, Applicative m) => WDSessionState m where Source
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 :: m WDSession Source
Retrieves the current session state of the monad
putSession :: WDSession -> m () Source
Sets a new session state for the monad
WDSessionState WD Source | |
WDSessionState m => WDSessionState (MaybeT m) Source | |
WDSessionState m => WDSessionState (IdentityT m) Source | |
WDSessionState m => WDSessionState (ReaderT r m) Source | |
WDSessionState m => WDSessionState (StateT s m) Source | |
WDSessionState m => WDSessionState (StateT s m) Source | |
(Error e, WDSessionState m) => WDSessionState (ErrorT e m) Source | |
(Monoid w, WDSessionState m) => WDSessionState (WriterT w m) Source | |
(Monoid w, WDSessionState wd) => WDSessionState (RWST r w s wd) Source | |
(Monoid w, WDSessionState m) => WDSessionState (RWST r w s m) Source |
type WDSessionStateIO s = (WDSessionState s, MonadBase IO s) Source
Constraint synonym for the common pairing of WDSessionState
and MonadBase
IO
.
type WDSessionStateControl s = (WDSessionState s, MonadBaseControl IO s) Source
Constraint synonym for another common pairing of WDSessionState
and MonadBaseControl
IO
. This
is commonly used in library types to indicate use of lifted exception handling.
modifySession :: WDSessionState s => (WDSession -> WDSession) -> s () Source
withSession :: WDSessionStateControl m => WDSession -> m a -> m a Source
Locally sets a session state for use within the given action. The state of any outside action is unaffected by this function. This function is useful if you need to work with multiple sessions simultaneously.
WebDriver sessions
The local state of a WebDriver session. This structure is passed
implicitly through all WD
computations
WDSession | |
|
mostRecentHistory :: WDSession -> Maybe SessionHistory Source
The most recent SessionHistory entry recorded by this session, if any.
mostRecentHTTPRequest :: WDSession -> Maybe Request Source
The most recent HTTP request issued by this session, if any.
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.
SessionHistoryConfig options
type SessionHistoryConfig = SessionHistory -> [SessionHistory] -> [SessionHistory] Source
A function used by wdHistoryConfig
to append new entries to session history.
noHistory :: SessionHistoryConfig Source
No session history is saved.
unlimitedHistory :: SessionHistoryConfig Source
Keep unlimited history
onlyMostRecentHistory :: SessionHistoryConfig Source
Saves only the most recent history