Skip to main content

Locator Level Timeouts

Since v2.19.0

Gwen supports specifying locator level timeouts for overriding the default timeout gwen.web.locator.wait.seconds. This is useful for cases where you may want to increase the locator timeout period for some web elements without impacting others. A web element that takes a long time to load for example can have a higher locator timeout without slowing down the rest of your locators.

Examples

  # will cause lookup to fail immediately if username is not present on the page
And the username can be located by id "username" with no wait

# will cause lookup to fail if the username is not available on the page after waiting 20 seconds
And the username can be located by id "username" with 20 second timeout

# will cause lookup to fail if the username is not available on the page after configured wait time (default behaviour)
And the username can be located by id "username"

DSLs

The following DSLs support locator timeouts: