TruePath: Relative XPath On Click

TruePath: Relative XPath On Click

TruePath: is a web extension designed for Chrome & Firefox browser. Once installed, when a user right clicks on any web element on the web page, it will display all the XPath as menu items. User can easily copy the XPath and use in automation code.

To install in Chrome click here
To install in Firefox click here

For Chrome or Firefox (old versions): It group the XPath as follows

1. XPath with id, href, src: This group will list all XPath, which has id, href, src or any http\ https as attribute. 

2. XPath with class, name, title: This group will list all XPath except those containing id, href, src or any http\ https.

3. XPath with index: As the name suggest this group will contain all indexed XPath.

For Firefox 56+: It group the XPath as follows

1. Green thumbs up: This group will list all XPath except those containing id, href, src or any http\ https.

2. Yellow thumbs up: This group will list all XPath, which has id, href, src or any http\ https as attribute. 

3. Red thumbs up: This group will contain all indexed XPath.

How to use TruePath to identify XPath on iFrame

How TruePath will help to find XPath for elements having dynamic attributes

If elements have long, auto-generated attributes such as id="abc123_ElementContains_Inputs_txtName" it will attempt to locate based on the final (and most significant) part of the value only.

Sometimes the attribute id, src, href etc. contains auto-generated values that's why grouping them under yellow thumbs. Indexed XPath are kept in Red Thumbs up group as they are vulnerable to the frequent UI changes. The automation tester can use these XPath from these two groups, depending upon the understanding of the web page(AUT).

Support email: qaworld.sumit@gmail.com
For concern, issue and feedback: click here


To view or add a comment, sign in

More articles by Sumit Ghosh

  • soft-assert: Ruby Gem

    Popular Ruby testing frameworks, including Minitest and Test::Unit, lack a built-in soft-assert feature. To address…

    3 Comments
  • Insomnia Response Validator-Unit Test Plugin

    Overview This is a plugin for Insomnia API client that can validate the response based upon expected result…

Others also viewed

Explore content categories