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
• 2,810 points
40 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
0 votes
3 answers
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,130 points
32 views
+1 vote
2 answers

How to get the title of a webpage using Selenium Java?

Essentially, driver.getTitle(); function can be used to ...READ MORE

answered Dec 17, 2018 in Selenium by Vardhan
• 10,560 points
66 views
0 votes
1 answer

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,030 points
56 views
0 votes
1 answer
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,130 points
421 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
43 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 in Selenium by Surya
• 780 points
11 views
0 votes
1 answer

How to get the text from a website using selenium?

hey, you can use get.text() method to ...READ MORE

answered Dec 31, 2018 in Selenium by Sudhanshu
64 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.