Wait until either the given action succeeds or the timeout is reached. The action will be retried every .5 seconds until no ExpectFailed or FailedCommand NoSuchElement exceptions occur. If the timeout is reached, then a Timeout exception will be raised. The timeout value is expressed in seconds.
Modulewebdriver-0.12.0.1Haskell2010
Test.WebDriver.Commands.Wait
- 1 type
- 12 values
- Packagewebdriver-0.12.0.1
- Exports13
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceWait.hs
Wait on expected conditions
4 declarationsSimilar to waitUntil but allows you to also specify the poll frequency
of the WD action. The frequency is expressed as an integer in microseconds.
Like waitUntil, but retries the action until it fails or until the timeout is exceeded.
Like waitUntil', but retries the action until it either fails or until the timeout is exceeded.
Expected conditions
8 declarationsAn exception representing the failure of an expected condition.
Constructors
Instances3Eq, Show, Exception
Eq ExpectFailedDefined in webdriver-0.12.0.1 · Test.WebDriver.Commands.WaitShow ExpectFailedDefined in webdriver-0.12.0.1 · Test.WebDriver.Commands.WaitException ExpectFailedDefined in webdriver-0.12.0.1 · Test.WebDriver.Commands.Wait
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 :: (MonadBaseControl IO m, HasCallStack)=> StringReason why the expected condition failed.
-> m a
throws ExpectFailed. This is nice for writing your own abstractions.
Apply a monadic predicate to every element in a list, and expect that at least one succeeds.
Apply a monadic predicate to every element in a list, and expect that all succeed.
expect an alert to be present on the page, and returns its text.
Catches any FailedCommand exceptions with the given FailedCommandType and rethrows as ExpectFailed
Convenience functions
Convenience function to catch FailedCommand Timeout exceptions and perform some action.
Example:
waitUntil 5 (getText <=< findElem $ ByCSS ".class")
`onTimeout` return ""