How to get all the links from google search?
Hello Emma,
You can use the following code to do this.
By.tagName("div");
List<WebElement> listings = wd.findElements(By.className("TbwUps"));
listings.size();
for(WebElement loop : listings)
{
System.out.println(loop.getText());
}