How to get all the links from google search

+1 vote
I am building a project of mine where I ask user to input a keyword and return them all the google links.

How to achieve it?
Dec 14, 2018 in Selenium by Nitesh
• 3,080 points
1,259 views

1 answer to this question.

0 votes

You can use the following code to do this.

By.tagName("div");
List<WebElement> listings = wd.findElements(By.className("TbwUpd"));
listings.size();
for(WebElement loop : listings)
{
    System.out.println(loop.getText());
}
answered Dec 14, 2018 by Shuvodip

Related Questions In Selenium

0 votes
0 answers

How to get the text from the HTML5 input error message in Selenium?

On giving invalid data in the email ...READ MORE

Mar 12, 2019 in Selenium by Vaishnavi
• 1,180 points
1,967 views
0 votes
3 answers

How to click the search button using Selenium web driver and Python

You can try with tag. #this code will ...READ MORE

answered Apr 10, 2019 in Selenium by Matin
16,235 views
0 votes
1 answer

How to get list of tests from Test Explorer in VS

Select all tests in Test Explorer and ...READ MORE

answered Aug 1, 2018 in Selenium by Samarpit
• 5,910 points
2,750 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
13,649 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
9,131 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
7,209 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,865 views
0 votes
1 answer

How to get the text from all the cells of an HTML table?

This worked for me. Check this out import ...READ MORE

answered May 10, 2019 in Selenium by Surya
• 970 points
2,358 views
0 votes
2 answers

How to get the text from a website using selenium?

driver.findElement(By.cssSelector("p")).getText() or  IWebElement element = Browser.GetElementByCssSelector("div.loginbox p"); string text = ...READ MORE

answered Sep 6, 2020 in Selenium by Sri
• 3,190 points
25,674 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP