When you record a step in a browser test that interacts with an element on the page, mabl tracks over thirty distinct attributes, including text, CSS classes, data-test-id, and other information such as location and size on the page. This information is known as the element history and serves as the foundation of mabl's intelligent find strategy during subsequent test runs.
If an element's attributes get updated, either because of a small update in the application or a successful auto-heal, mabl records this information in the step's element history. This article explains how to review element history for a find step, including how to...
Note
Element history is tracked separately per environment. For example, if a test runs in two environments, a step tracks element history for both environments separately.
Identify changes in element history
To identify changes in element history for a find step, go to the test output page for the test run and take the following actions:
- Click on the test step.
- Select the Logs tab.
- Click on the Element history button in the mabl Activity tab. The element history appears in a modal. Attributes that changed are highlighted in purple.
Viewing element history on the test output page
- To view all changes for a specific attribute, click on the circle icon next to the attribute.
Previous versions of the element, from both auto-heals and small updates, appear in the rows below.
- Small updates: If a strong match for an element was found, but a few attributes changed, mabl makes a small update to the element history as long as (1) the test run ultimately passes and (2) the test run is part of a plan run.
- Auto-heals: If mabl did not find a strong match and attempted an auto-heal, the auto-heal is recorded in the element history as long as (1) the test run ultimately passes and (2) the test run is part of a plan run.
Shared element history
In the following cases, an element and its history are shared among multiple steps:
- The same element is used across steps during training. For example, if the test records a click step on an input field and then a step that enters text into the input field, mabl tracks a shared element history for both steps.
- The step is part of a flow, and the flow is used in multiple tests.
- The step, or the entire test, was duplicated. If you duplicate a step, both steps share the same element history. If you duplicate a test, the steps that were duplicated share an element history with their original counterparts.
Roll back the element history
To roll back to a previous version in the element history, click on the clock icon.
When you roll back the element history, any more recent versions of the element - rows above the selected version - are deleted. Since element history is tracked separately per environment, rolling back the element history in one environment does not affect the element history in other environments.
Rollbacks don't prevent auto-heals
Rolling back the element history does not prevent the same auto-heal from happening. For more information on preventing auto-heals, see the auto-heal FAQs guide.