-1

I would like to understand more on how is Katalon identifying web element's xpath while the user is hovering the mouse on the webpage.

It works just like how the inspect element from web developer tools work. Can someone explain the actual code of this or where can I find the source code of this?

Mate Mrše
  • 7,997
  • 10
  • 40
  • 77

1 Answers1

2

How to identify nested elements?

Identifying XPath is an effective way to find nested elements which can’t be identified by common properties such as ID, Name, or Class. There are two ways to find XPath:

Detect XPath by other tools: Web browsers usually have Adds-on support users to identify XPath. However, It can be a challenge since it depends on alot of the tools.

Detect XPath by Katalon Studio: Katalon Studio can generate and optimize XPath for HTML elements, regardless of how deeply nested they are. You can use these XPaths to identify elements without having to search through the DOM tree.

Deal with dynamically changing elements

One of the challenging and time-consuming tasks in test automation is to modify test scripts when the AUT is changed, especially in the early stages of software development. Developers may change identifiers and elements quite often from one build to another. In addition, during the execution, the AUT’s elements may change dynamically.

To deal with these challenges, automation testers should not set fixed XPaths for elements in test cases, but instead scripting XPaths dynamically based on certain patterns. Katalon Studio supports all Xpath Axes, such as

  1. following-sibling
  2. preceding-sibling
  3. contains
  4. descendant
  5. starts-with

enter image description here

For more information please visit

https://docs.katalon.com/katalon-studio/tutorials/detect_elements_xpath.html#what-is-xpath

akshay patil
  • 670
  • 7
  • 20