Lucia
0
Q:

how to find all the links present in a web page

All the link TagName should be "a". 
I locate the webelements starts with tagname "a". 
I also use driver.findElements instead of driver.findElement since the 
list of webelements will return.

List <WebElement>  list = driver.findElements(By.tagName(a))
1
All the link TagName should be "a". 
I locate the webelements starts with tagname "a". 
I also use driver.findElements instead of driver.findElement since the 
list of webelements will return.

List <WebElement>  list = driver.findElements(By.tagName(a))
0

New to Communities?

Join the community