How to search for a string without clicking on search button

+1 vote
Is there a way to google search without clicking on search button? Can someone help me with this? I am new to selenium.
Jan 5, 2019 in Selenium by Jino
• 5,820 points
2,309 views

1 answer to this question.

0 votes

There is a way by which you can do this. All you need to do is in sendkeys you need to send a keystroke enter.

So normally what you do is that you type for a keyword and press enter. Similar will be the scenario here.

Here is the code for doing this :-

driver.findElement(By.name("q")).sendKeys("Your keyword",Keys.ENTER);

Hope this helps.

answered Jan 5, 2019 by Disha

Related Questions In Selenium

0 votes
1 answer
+2 votes
1 answer
0 votes
1 answer

How can I search for a video on YouTube?

I will tell you step by step ...READ MORE

answered Dec 20, 2018 in Selenium by Nabrupa
6,251 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,467 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,021 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,135 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,812 views
0 votes
1 answer
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