Forum Discussion

sanj's avatar
sanj
Super Contributor
8 years ago

using xpath from chrome

Has anyone else had issues with using xpath from chrome?

For eg when I try the following:

//*[@id="backgroundTable"]/tbody/tr/td/table/tbody/tr/td/table[4]/tbody/tr/td/table[4]/tbody/tr/td/table/tbody/tr[1]/td/h3

 

its giving me an error saying its unable to find the xpath

  • Ok I found out what was the difference:

    I should have waited a few min and tried some stuff out

    //html[1]/body[1]/table[1]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/table[5]/tbody[1]/tr[1]/td[1]/table[4]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/h3[1]

    it should be an array instead of just h3

    I found the xpath that soap ui needs by going onto outline view and getting the xpath

     

  • sanj's avatar
    sanj
    Super Contributor

    Ok I found out what was the difference:

    I should have waited a few min and tried some stuff out

    //html[1]/body[1]/table[1]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/table[5]/tbody[1]/tr[1]/td[1]/table[4]/tbody[1]/tr[1]/td[1]/table[1]/tbody[1]/tr[1]/td[1]/h3[1]

    it should be an array instead of just h3

    I found the xpath that soap ui needs by going onto outline view and getting the xpath