Handling Dynamic Xpath

后端 未结 6 481
心在旅途
心在旅途 2021-01-06 18:49

Am automating things using Selenium. Need your help to handle Dynamic Xpath as below:

Driver.findElement(By.xpath(\"//[@id=\'INQ_2985\']/div[2]/tr/td/div/div[3

6条回答
  •  太阳男子
    2021-01-06 19:23

    The best choice is using full xpath instead of id which you can get easily via firebug.

    e.g.

    /html/body/div[3]/div[3]/div[2]/div/div[2]/div[1]/div/div[1]
    

提交回复
热议问题