Skip to main content

Description

The wait method stops the test for a number of milliseconds. Then it continues. Use this to add delays between actions, to wait for animations to complete, or to let state changes become stable.

Syntax

Arguments

Examples

Best Practices

  • Use it for simple delays. Wait for animations, transitions, or state changes after an action.
  • Do not use it to wait for an element. If you wait for a specific element to show, use find() with a timeout option:
  • Do not use very long timeouts. This keeps the tests efficient.
  • Use it only when necessary. The TestDriver redraw detection waits automatically for the screen and the network to become stable after each action.