HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulewebdriver-0.12.0.1Haskell2010

Test.WebDriver.Monad

  • 1 type
  • 6 values
newtypenewtype WD a
#

A state monad for WebDriver commands.

Constructors

Instances13Monad, Functor, MonadFix, Applicative, MonadIO, MonadCatch, …
  • Monad WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • Functor WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadFix WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • Applicative WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadIO WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadCatch WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadMask WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadThrow WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • WebDriver WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • WDSessionState WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadBase IO WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • MonadBaseControl IO WDDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
  • type StM WD a = StM (StateT WDSession IO) aDefined in webdriver-0.12.0.1 · Test.WebDriver.Monad
valuerunSession :: WebDriverConfig conf => conf -> WD a -> IO a
#

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
valuefinallyClose :: WebDriver wd => wd a -> wd a
#

A finalizer ensuring that the session is always closed at the end of the given WD action, regardless of any exceptions.

valuecloseOnException :: WebDriver wd => wd a -> wd a
#

Exception handler that closes the session when an asynchronous exception is thrown, but otherwise leaves the session open if the action was successful.