1$(document).ready(function(){
2 $('a').each(function(){
3 console.log($(this).attr('href'));
4});
5});
6
1All the link TagName should be "a".
2I locate the webelements starts with tagname "a".
3I also use driver.findElements instead of driver.findElement since the
4list of webelements will return.
5
6List <WebElement> list = driver.findElements(By.tagName(a))