Configuring find steps

Overview

With standard find strategies, mabl waits for the page to settle before looking for a matching element candidate. However, if your application or environment tends to run on the slower side, it is possible that mabl can auto-heal too early.

By using configured find steps, you can specify which element attributes are the most important and the time that mabl should wait for a matching element (up to 15 minutes) before widening the search and auto-healing.

Use cases

Configuring find steps is particularly useful when:

  • It may take an extended period of time for your application to reach the correct state
  • You would like mabl to search for an element based on a specific attribute and then continue with the test as soon as that attribute is found
  • You would like the test to fail if an attribute is not present on the page within the specified time frame

Configuring find steps

The configure find option for a step can be found under the More Actions menu in the mabl Trainer.

  1. Click on More actions (...) .
  2. Click on Configure Find.
596

Creating a configured find step

  1. In the Configure Find menu, select the attributes that you would like mabl to target. The attributes available are based on the element that has been selected.

👍

Resilient Configure Find steps

During test execution, mabl only considers elements that match ALL the selected Configure Find values before either failing (if auto-heal is disabled) or attempting to auto-heal.

To ensure that the step is not over-constrained, only select the most important attributes.

591

Selecting attributes for the step

📘

Ancestor Elements

Ancestor elements are called "containers" in the Configure Find menu because they contain the element being used in the step.

  1. After selecting attributes, set a timeout. The timeout indicates the minimum amount of time mabl should wait before failing or auto-healing. In some cases, mabl may use its Intelligent Wait model to continue searching after the timeout for something matching ALL Configure Find values.

  2. Select how mabl should proceed if the timeout is met without finding an element matching ALL the selected Configure Find attributes:

    • 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.
340

Specifying the timeout and action if the element is not found

📘

Element History

When finding an element, mabl always uses the latest information from recently found versions of that element. The step info in the trainer only shows the most recent version, but you can find the full history with the Element History button.

Data-driven find steps

595

Editing attributes in configured find steps

  1. Configured finds can also be turned into data-driven steps using the Edit option in the Configure Find menu.
603
  1. These attributes can be edited to look for a specific variable or parameter for the selected attribute.

👍

Parameterized Flows

If you are interested in creating powerful flows, data-driven configured find steps can be leveraged in parameterized flows by referencing those parameters with the corresponding attributes.