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
- following-sibling
- preceding-sibling
- contains
- descendant
- starts-with

For more information please visit
https://docs.katalon.com/katalon-studio/tutorials/detect_elements_xpath.html#what-is-xpath