Creating resilient find steps for similar elements

Overview

Mabl uses a number of intelligent find strategies to locate elements in your application. Providing context when there are many similar elements on the page allows mabl to tailor these strategies and create even more resilient find steps. Adding this information enables us to quickly adapt to changes and better support lists and grids in your application.

For example, perhaps your application has a grid with 14 similar elements and you select the first element in the third row. Did you pick this element because of the content of the element, the class name, or the href? Specifying the information that is essential allows mabl to find this element if the position or content has changed. Instead of using XPath or CSS in these instances, mabl can easily locate these elements for you.

Use Cases

Providing mabl with additional information is particularly useful when:

  • Selecting a checkbox for rows in a list or table that contain a given value
  • Selecting an element based on its position in a list or table
  • Finding the correct element when the position may change between test runs
  • Filtering and validating columns in a table to ensure that they are unique or contain specific information

Providing contextual information in the mabl Trainer

  1. When mabl determines that it may need to gather additional information, it will ask you to "Provide more context" or prompt you with the question “Why did you click this element?”. When providing this context, the Trainer will display how many similar elements have been found and highlight each relevant element.
  1. A confidence rating will be generated based on how many similar elements that have been found. Selecting identifying attributes will increase this confidence rating. If a selected attribute conflicts with the attribute of another element that has been located, mabl will disable the ability to select the conflicting attribute.

Confidence Ratings

The confidence rating conveys how confident mabl is in finding the intended element when the test runs in the cloud, especially if the content or position changes over time.

  1. These identifying attributes can be customized based on your use case. For example, you can tell mabl to look for an element that contains a particular variable as the innerText. If the attribute you are looking for is not initially displayed, select “Show me more options” to view all available attributes.
  1. Once you have selected all relevant attributes, click Save. The selected attributes can be seen by hovering over "View criteria".

Adding context later and editing criteria

If you would like to provide context for a step at a later time, simply click on the "Provide more context?" badge displayed at the bottom of the step. Likewise, the attributes for a step can be modified by clicking "View criteria".

Updated about a month ago


Creating resilient find steps for similar elements


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.