3

I am facing an issue with FirePath
I am getting

html/body/center/center[3]/form/table/tbody/tr[1]/td[2]/input

from the XPath of the FirePath. This is an absolute path.
But I need a relative path. How to get it?

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
danish
  • 41
  • 2
  • 3
  • 5

1 Answers1

3

Better way is to write your own custom relative xpath.

There is an alternate way to get the relative xpath with help of the FirePath tool also. To get relative XPATH: Click on the drop down menu on the Firepath button and Unselect ‘Generate absolute XPath’.As shown below:

Then you should be getting relative XPATH (remove the "." from generated XPATH) as shown below: enter image description here

Surya
  • 4,446
  • 2
  • 17
  • 19