Safe Haskell | None |
---|
- newtype WD a = WD (StateT WDSession IO a)
- runWD :: WDSession -> WD a -> IO a
- runSession :: WDSession -> Capabilities -> WD a -> IO a
- withSession :: WDSession -> WD a -> WD a
- finallyClose :: WD a -> WD a
- closeOnException :: WD a -> WD a
Documentation
A monadic interface to the WebDriver server. This monad is a simple, strict
layer over IO
, threading session information between sequential commands
runSession :: WDSession -> Capabilities -> WD a -> IO aSource
Like runWD
, but automatically creates a session beforehand and closes it
afterwards. This is a very common use case.
withSession :: WDSession -> WD a -> WD aSource
finallyClose :: WD a -> WD aSource
A finalizer ensuring that the session is always closed at the end of
the given WD
action, regardless of any exceptions.
closeOnException :: WD a -> WD aSource
A variant of finallyClose
that only closes the session when an
asynchronous exception is thrown, but otherwise leaves the session open
if the action was successful.