webdriver-0.8.3: a Haskell client for the Selenium WebDriver protocol

Safe HaskellNone
LanguageHaskell2010

Test.WebDriver.Monad

Synopsis

Documentation

runWD :: WDSession -> WD a -> IO a Source

Executes a WD computation within the IO monad, using the given WDSession as state for WebDriver requests.

runSession :: WebDriverConfig conf => conf -> 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 when complete. If you want this behavior, use finallyClose. Example:

   runSessionThenClose action = runSession myConfig . finallyClose $ action

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.

getSessionHistory :: WDSessionState wd => wd [SessionHistory] Source

Gets the command history for the current session.

dumpSessionHistory :: WDSessionStateControl wd => wd a -> wd a Source

Prints a history of API requests to stdout after computing the given action.