Safe Haskell | Safe-Infered |
---|
- data ExpectFailed
- expect :: Bool -> WD ()
- unexpected :: WD a
- expectAny :: (a -> WD Bool) -> [a] -> WD ()
- expectAll :: (a -> WD Bool) -> [a] -> WD ()
- (<||>) :: Monad m => m Bool -> m Bool -> m Bool
- (<&&>) :: Monad m => m Bool -> m Bool -> m Bool
- waitUntil :: Double -> WD a -> WD a
- waitUntil' :: Int -> Double -> WD a -> WD a
- waitWhile :: Double -> WD a -> WD ()
- waitWhile' :: Int -> Double -> WD a -> WD ()
Expected conditions
data ExpectFailed Source
An exception representing a failure of an expected condition.
An expected condition. This function allows you to express assertions in
your explicit wait. This function raises ExpectFailed
if the given
boolean is False, and otherwise does nothing.
unexpected :: WD aSource
Raises ExpectFailed.
Convenience functions
Wait on expected conditions
waitUntil :: Double -> WD a -> WD aSource
Wait until either the given action succeeds or the timeout is reached. The action will be retried every .25 seconds until no ExpectFailed or NoSuchElement exceptions occur. The timeout value is expressed in seconds.
waitUntil' :: Int -> Double -> WD a -> WD aSource
Similar to waitUntil but allows you to also specify the poll frequency of the WD action. The frequency is expressed as an integer in microseconds.