Configuring find steps

Overview

Configuring find steps allows you to tell mabl how long to wait for an element based on an element's attributes. With standard find strategies, mabl will wait 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

Creating a configured find stepCreating a configured find step

Creating a configured find step

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

Selecting attributes for the step

  1. Once you reach the Configure Find menu, you can select the attributes that you would like mabl to target. In order to ensure these steps are resilient, only select the most important attributes to ensure the step is not over-constrained. In this example, we need to target a button element with the innerText "NEW WINDOW".

Note: The attributes available are based on the element that has been selected. If you select the container or ancestor of an element instead of the element itself, you will likely see different attributes here.

📘

Ancestor Elements

For any step that interacts with something on the page, there is a target element that mabl will attempt to find to execute the step. This is the element being clicked, asserted on, hovered over, etc. In cases when this target element is difficult to identify on the page, mabl will also capture information about a recognizable ancestor element to serve as a guide post for finding the target element. With configurable finds, you control how mabl finds each of these elements by selecting the attributes on each (or on just one) to wait for.

Specifying the timeout and action if the element is not foundSpecifying the timeout and action if the element is not found

Specifying the timeout and action if the element is not found

  1. Once you have selected the attributes, you can set the timeout for the maximum amount of time that mabl should wait before proceeding. If mabl does not find a button with the "NEW WINDOW" text, we will fail the step.If you would like mabl to try to find a similar element when the specified set of attributes have not been located, you can allow the step to auto-heal. This will expand the search parameters and select the next best element candidate.

📘

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 at the bottom of the step in the output of any run of the journey. If the latest version is not correct, you can still configure the find to wait for the appropriate element attributes and then use the Element History rollback to ensure mabl is looking for matches to the correct attribute values.

Data-driven find steps

Editing attributes in configured find stepsEditing attributes in configured find steps

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


Did this page help you?