Adding wait steps

Configuring waits in browser tests

When a browser test executes in the cloud, mabl uses Intelligent Wait to make sure your application is in the correct state before interacting with elements on the page. In some cases, however, you may want to configure additional waits.

In mabl browser tests, there are three ways to configure additional waits:

  1. Configure Find
  2. Wait until steps
  3. Wait steps

In most cases, Configure Find and wait until steps are the recommended method for configuring additional waits because the total wait time is dynamic. If the application is ready before the set timeout, mabl completes the step and continues to execute the next steps.

Wait steps, on the other hand, always wait for a specific amount of time. Wait steps can be useful for isolating performance issues during test execution or capturing a screenshot of the page at a specific point in the test. As a general rule, we recommend using wait steps sparingly because they can slow down the feedback cycle of your tests.

This article explains how to add the three different types of waits to a browser test.

Configure Find

All find actions in mabl, including assertions and clicks, automatically wait up to 30 seconds for the target element to appear. If the element takes longer than 30 seconds to appear in your app, or if the element comes into existence without being fully realized, you can use Configure Find.

Configure Find allows you to:

  • specify which element attributes mabl should look for
  • set a timeout to define how long mabl should look for the element
Defining a timeout for a Configured Find

Defining a timeout for a Configured Find

The default timeout for Configure Find steps is 15 seconds, but you may set the timeout to wait up to 15 minutes (900 seconds) before finding and interacting with the target element. For more information on using Configure Find, check out this guide.

Wait until steps

Wait until steps wait up to a maximum number of seconds for a specific element to be present on the page. If mabl finds the target element before the timeout, the wait is complete and mabl moves on to the next step.

Wait until steps are less static than wait steps and less rigid than using CSS and XPath queries to find an element. Use wait until steps to specify a timeout and the attributes that mabl should wait for before attempting to auto-heal.

To add a wait until step in the mabl Trainer, take the following steps:

  1. Click on the plus icon at the bottom of the Trainer window to add a step.
  2. Click on Wait.
  3. Select "Add wait until."
Adding a wait until step

Adding a wait until step

  1. Select the element that mabl should wait for.
  2. Check the attributes that you would like mabl to target. The available attributes are based on the element that you selected.
Selecting attributes

Selecting attributes

  1. Click Next.
  2. Configure a maximum wait up to 900 seconds.
  3. Indicate whether you would like mabl to auto-heal if a matching element is not found.
  4. Click OK.



When working with wait until steps, keep in mind the following limitations:

  • You cannot use CSS or XPath to identify the target element for a wait until step.
  • You cannot configure a wait until step to wait until an element is absent.

If you have a use case involving these limitations, please let us know in the mabl Product Portal.

Wait steps

Wait steps, also known as static waits, tell mabl to wait a specific amount of time before moving on to the next step.

To insert a wait step in the mabl Trainer, take the following steps:

  1. Click on the plus icon at the bottom of the Trainer window to add a step.
  2. Click on Wait.
  3. Select "Add wait."
Adding a wait step

Adding a wait step

  1. Enter the number of seconds to wait before executing the next step, up to 900 seconds.
  2. Click OK.