Technical

Auto-healing Smart XPath in Katalon Studio

Shot Of Two Technicians Working Together In A Server Room

Katalon Studio 7.6.0 introduces Self-healing to replace Auto-healing Smart XPath for Web test execution. Katalon Studio’s most recent version is available for download.

Install the Smart XPath Auto-healing Plugin

  1. Go to the Katalon Store and download the Auto-healing Smart XPath plugin.
  2. After installing the plugin successfully, launch Katalon Studio. Select Reload Plugins from the Profile button’s dropdown menu. See Reload plugins for more information on the plugin installation.
  3. Select the Auto-healing Smart XPath button from the main toolbar. The Auto-healing Smart XPath is currently enabled if you see the Smart XPath Disable.

Picture1

Configure XPath

Go to Project Settings > Test Design > Web Locators. Choose the XPath option.

Picture2

 

The list includes XPath generator providers that generate XPath values for Katalon Studio test objects. You can change the Xpath priority by dragging and dropping.

Create Test Objects by Spying or Recording

When the Recording or Spying feature in Katalon Studio creates test objects in test cases, a set of XPath values is generated in the prioritized order of the XPath generator provider list. The first value in the list is the test objects’ default XPath value.

Picture3

 

Use Auto Healing to Run Test Cases Supported by Smart XPath

If a default XPath value fails to detect a test object during execution, other XPath options in the list are automatically applied until the test object is found. The execution continues as if there was no failed detection. This saves significant time when updating test cases, especially when the test cases are run in batch overnight.

Picture4
Picture5

 

Update to the new stable XPath values

After execution, you can update the proposed XPath values to the test objects. Go to Smart Xpath > Xpath Auto-healing logs.

Picture6

To update the value, check the Approve box and then click OK. Click Approve all if you want to update all values.

Close the object after approval and refresh the Object Repository to see the updated XPath values.

Picture7

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Rutwik Surjuse

Rutwik Surjuse works in Quality Assurance at Perficient, based in Nagpur, India. He is experienced in automation, AEM, and manual testing. Rutwik likes to learn and explore different types of technology and share his findings with the world.

More from this Author

Follow Us
TwitterLinkedinFacebookYoutubeInstagram