0

I am facing issue with xpath using firepath .

If I select any web element using fire path it is giving xpath as html/body/div[1]/div/div[2]/div/form/fieldset/p/input but it is not selecting element properly previously it(xpath) is generating like below (means relative path)

By.xpath("//table[@id='tableId']/tbody/tr[1]")

Please guide me what to change in firepath.

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
user3415045
  • 491
  • 1
  • 6
  • 12

2 Answers2

1

i think the the absolute fire path is checked in fire path drop down.

To resolve this press F12 to open fire path, click on drop down arrow in fire path tab, Un check generate Absolute XPATH and restart you fire path.

Sachin
  • 51
  • 5
0

Relative XPATH syntax is:

//tagname[@attribute='value']

Neil
  • 14,063
  • 3
  • 30
  • 51