Handling Dynamic Xpath

后端 未结 6 482
心在旅途
心在旅途 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:16

    you can use css -

    div.context-menu-item-inner
    

    Use this xpath:

    driver.findElement(By.cssSelector("div.context-menu-item-inner").click();
    

提交回复
热议问题