When you train a mobile or browser test, mabl collects information about the elements that you interact with to ensure your tests find the correct element during execution. If the target element is very similar to other elements on the page, you can add Configure Find to specify which element attributes are the most important and how long mabl should look for it.
Configuring find steps is particularly useful in the following situations:
- It takes an extended period of time for your application to reach the correct state
- You want mabl to search for an element based on a specific attribute, then continue with the test as soon as that attribute is found
- You want the test to fail if an attribute is not present on the page within the specified time frame
Read on to learn how to configure resilient find steps.
Add Configure Find to a step
To access Configure Find, launch your mobile or browser test in the mabl Trainer. Hover over the test step you want to configure and click on the Configure Find icon.
Creating a configured find step
Select target attributes
The Configure Find menu presents attributes associated with the target element or the ancestor “container” element. Select attributes that uniquely identify the element.

Selecting attributes for the step
As a general guideline, choose one or two stable, unique attributes. Not sure which attributes you should select, see the recommendations for targeting complex elements.
Set a timeout
After selecting attributes, set a timeout. The timeout determines the maximum amount of time mabl will wait before either auto-healing or failing the step. The default timeout is 15 seconds, and the maximum supported timeout is 15 minutes.
For slow-loading elements, use a longer timeout. Configure Find timeouts are preferred over static waits because they are dynamic - mabl completes the step as soon as the correct element is located, even if the maximum Configure Find timeout period hasn’t been reached.
Choose auto-heal settings (browser tests only)
In browser tests, you can also select how mabl should proceed if the timeout is met and a match hasn’t been found:
- Disable auto-heal (default action): If mabl does not find an element that matches all of the Configure Find attributes, the step fails.
- Auto-heal: If mabl does not find an element that matches all of the Configure Find attributes, mabl expands the search parameters and selects the next best element candidate. See our guide on auto-heal for more information.

Specifying the timeout and action if the element is not found
Recommendations for targeting complex elements
During test execution, mabl only considers elements that match ALL of the selected Configure Find values. To ensure your test step is not overly constrained, only select one or two stable, unique attributes.
Avoid using heavily dynamic attributes, such as dynamic class names or volatile IDs. Instead, anchor the find using stable attributes, such as the following:
- Test IDs such as
data-testid,data-qa - Accessibility attributes such as
role,aria-label, oraria-labelledby - Stable attributes, as long as they are unique such as
name,title,placeholderorinnerText
If the target element lacks stable, unique attributes, consider one of the following approaches:
- Use ancestor elements to scope the find
- Use variables to capture dynamic attributes
- Talk to your developers about establishing a data test ID convention
Use ancestor elements to scope the find
If the target element lacks stable, unique attributes, you could try to scope the find to an ancestor element, which is described as a “container” element in the Configure Find menu. Ancestor element attributes help remove ambiguity and scope the search, which is especially helpful on pages with repetitive UI structures, such as repeating tables, modals, or forms.
For example, if you are targeting a delete icon SVG that has no unique attributes of its own, scope the find to the SVG’s parent element, such as a div with the unique attribute data-test-id="delete-button".
Use variables for dynamically generated attributes
If a target element has a unique attribute, but it changes on every execution, you can also configure your finds to use variable or parameter values. In the Configure Find menu, hover over the attribute and click on the edit pencil to add in a data-driven value using mabl variable syntax: {{@varName}}.
Editing Configure Find attributes
For example, you can configure an await tab step to target a new tab that has a URL containing the value {{@productId}}.
Creating a data-driven Configure Find
Establish a data test ID convention
If none of the preceding suggestions work, talk to the developers on your team about establishing a data test ID convention for critical elements. Adding data test IDs is a low-effort change that can make your tests a lot more reliable.