Quick Element Update
  • 14 May 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Quick Element Update

  • Dark
    Light

Article summary

What is Quick Element Update?

If there is a step in test results where the intended element was not tapped, the Quick Element Update feature allows you to easily reselect the element from the test results page so that the correct element is tapped in the next test run.

The advantage of Quick Element Update is that you can quickly make updates without re-recording. There is no need to launch the Autify Recorder and replay all the previous steps in order to update the target step.
Please note that Quick Element Update is only available for tap actions (what appears as a “tap” on the screen).

Quick Element Update can be used regardless of whether the step passed or failed, making it useful in a variety of situations.

Using Quick Element Update

To use Quick Element Update, open the Test Result Details Page, go to the step in which the intended element was not tapped, and click the “Update Element” button at the lower right corner.
update_element_en.png

1. Update via image recognition

This is a straightforward method, where you update from the screenshot.

In the test result screenshot, click on the element you want to select and click “Update Element”.
When Autify searches for an element via image recognition, it searches for the element based on the appearance of the area around the tapped location when the scenario was recorded. Therefore, selecting an element or an area around it that has a distinctive appearance will ensure that the element is tapped more reliably.

See also: image recognition tips.

Specify (update) the XPath

If Autify cannot reliably find the target element using image recognition, such as when the element's appearance changes frequently, updating the XPath may be effective. This is an option where you specify the element's XPath, which you can get from the page source.
Click “Update Element via XPath” on the upper right corner of the page.
update_element_2_en.png

The actual page is displayed on the left side, and the Page Source is displayed on the right. Make sure that "XPath" is selected at the bottom of the page.
If it is not XPath, select it from the pull-down menu.

update_element_3_en.png

For example, in the figure below for specifying the “Sign Up” button, selecting the target element on the Page Source screen will highlight the corresponding section in the screenshot. Once selected, click “Update Selected Element.”

update_element_4_en.png

You can also specify the XPath directly, as shown below. By adding information to the XPath that is necessary to locate the target element and removing unnecessary information, you can make the element selection more reliable than using the auto-generated XPath. For more information, please see XPath tips.
update_element_5_en.png

3. Specify (update) the Accessibility ID

Accessibility ID is a unique ID assigned to elements for the purpose of test automation.
If other methods (updating via image recognition and XPath) do not improve the test's reliability, we recommend that you add Accessibility IDs in your application implementation and use them in your tests.
For more information, please refer to Accessibility ID tips.

Similar to XPath, click on "Update Element via XPath" in the upper right corner of the test results screen and select "Accessibility ID" from the pull-down menu.
Enter the Accessibility ID of the element you want to select and click "Update selected element".
update_element_6_en.png

After using Quick Element Update

Regardless of which method you use for updating the element, you will see "Step has been updated. Rerun Scenario" on the upper left corner. At this point, you can rerun the scenario by clicking "Rerun Scenario". The updated scenario will be rerun.
update_element_7_en.png

Also at the bottom of the page, you will see one of the following:

  • "Locator Strategy: Image Recognition" if you updated via image recognition.
  • "Locator Strategy: XPath" if you updated via XPath.
  • "Locator Strategy: Accessibility ID" if you updated via Accessibility ID.

The details of the XPath or Accessibility ID will not be displayed on this screen. To check the details, please reopen the update page.
Screenshot 2024-05-01 at 16.42.26.png

After updating, the test result page will show “updated”, confirming that the element in the target step has been updated.
Screenshot 2024-05-01 at 16.45.50.png

Notes

  • Using Quick Element Update will update the scenario's element and screenshot.
  • If you duplicate a scenario after using Quick Element Update, the updated content will be carried over to the duplicated scenario. If you duplicate the scenario before using Quick Element Update, the update will not be carried over to the duplicated scenario.
  • “Update Element” cannot be undone. If you want to select the same element that was originally selected, use “Update Elements” again and reselect the element.
  • If you update an element of a step within a Step Group, it will affect all scenarios that use that Step Group.

Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.