webdriver-0.14.0.0: a Haskell client for the Selenium WebDriver protocol
Safe HaskellNone
LanguageHaskell2010

Test.WebDriver.WD

Description

This module contains the WD monad, which serves as an example of how to use this library in a standalone fashion.

For more complex usage, you'll probably want to skip this module and write WebDriverBase and SessionState instances for your own monads.

You can find a full example in the project repo at https://github.com/haskell-webdriver/haskell-webdriver/blob/main/app/Main.hs.

Documentation

newtype WD a Source #

Constructors

WD (ReaderT Session (LoggingT IO) a) 

Instances

Instances details
MonadIO WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

liftIO :: IO a -> WD a #

Applicative WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

pure :: a -> WD a #

(<*>) :: WD (a -> b) -> WD a -> WD b #

liftA2 :: (a -> b -> c) -> WD a -> WD b -> WD c #

(*>) :: WD a -> WD b -> WD b #

(<*) :: WD a -> WD b -> WD a #

Functor WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

fmap :: (a -> b) -> WD a -> WD b #

(<$) :: a -> WD b -> WD a #

Monad WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

(>>=) :: WD a -> (a -> WD b) -> WD b #

(>>) :: WD a -> WD b -> WD b #

return :: a -> WD a #

MonadCatch WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

catch :: (HasCallStack, Exception e) => WD a -> (e -> WD a) -> WD a #

MonadMask WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

mask :: HasCallStack => ((forall a. WD a -> WD a) -> WD b) -> WD b #

uninterruptibleMask :: HasCallStack => ((forall a. WD a -> WD a) -> WD b) -> WD b #

generalBracket :: HasCallStack => WD a -> (a -> ExitCase b -> WD c) -> (a -> WD b) -> WD (b, c) #

MonadThrow WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

throwM :: (HasCallStack, Exception e) => e -> WD a #

MonadLogger WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

monadLoggerLog :: ToLogStr msg => Loc -> LogSource -> LogLevel -> msg -> WD () #

MonadUnliftIO WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

withRunInIO :: ((forall a. WD a -> IO a) -> IO b) -> WD b #

SessionState WD Source # 
Instance details

Defined in Test.WebDriver.WD

WebDriverBase WD Source # 
Instance details

Defined in Test.WebDriver.WD

MonadReader Session WD Source # 
Instance details

Defined in Test.WebDriver.WD

Methods

ask :: WD Session #

local :: (Session -> Session) -> WD a -> WD a #

reader :: (Session -> a) -> WD a #

Orphan instances