Clicking on a hypertext link using XPath

后端 未结 3 372
予麋鹿
予麋鹿 2021-01-21 20:16

Apologies if this is a dumb question - I\'m new to Selenium.

I have a web page I\'m testing that has a few hypertext links in a table. The HTML looks like this:

3条回答
  •  佛祖请我去吃肉
    2021-01-21 20:50

    List links = driver.findElements(By.tagName("a"));

    then iterate through links and click on each one of them using for loop

提交回复
热议问题