Safe Haskell | None |
---|---|
Language | Haskell98 |
- newtype WD a = WD (StateT WDSession IO a)
- runWD :: WDSession -> WD a -> IO a
- runSession :: WDConfig -> WD a -> IO a
- withSession :: WDSession -> WD a -> WD a
- finallyClose :: WebDriver wd => wd a -> wd a
- closeOnException :: WebDriver wd => wd a -> wd a
- dumpSessionHistory :: (MonadIO wd, WebDriver wd) => wd a -> wd a
Documentation
A monadic interface to the WebDriver server. This monad is simply a
state monad transformer over IO
, threading session information between sequential webdriver commands
runSession :: WDConfig -> WD a -> IO a Source
Executes a WD
computation within the IO
monad, automatically creating a new session beforehand.
NOTE: session is not automatically closed. If you want this behavior, use finallyClose
.
withSession :: WDSession -> WD a -> WD a Source
finallyClose :: WebDriver wd => wd a -> wd a Source
A finalizer ensuring that the session is always closed at the end of
the given WD
action, regardless of any exceptions.
closeOnException :: WebDriver wd => wd a -> wd a Source
Exception handler that closes the session when an asynchronous exception is thrown, but otherwise leaves the session open if the action was successful.
dumpSessionHistory :: (MonadIO wd, WebDriver wd) => wd a -> wd a Source
Prints a history of API requests to stdout after computing the given action.