Auto suggest text box in selenium webdriver

+1 vote

How to use the Auto-suggest text box in selenium web driver

driver.findElement(locator).click();

driver.findElement(locator).sendKeys(value);

driver.findElement(locator).sendKeys(Keys.TAB);

But I don't know which value I have to enter and what is Keys in 3rd line

Jul 27, 2018 in Selenium by Martin
• 4,320 points
8,373 views

1 answer to this question.

0 votes

You must enter a value to suggest from text box. Then the "key" mean selenium webdriver command. you can specify which key should press.

driver.findElement(locator).click();

driver.findElement(locator).sendKeys(value);

driver.findElement(locator).sendKeys(Keys.TAB);

driver.findElement(locator).sendKeys(Keys.ENTER);


answered Jul 27, 2018 by Samarpit
• 5,910 points
this method is not working, could u suggest some other way
@Suhas, can you tell what error or issue you are facing with this piece of code? It works fine for me.

Related Questions In Selenium

0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29, 2019 in Selenium by Anvi
• 14,150 points
6,795 views
0 votes
1 answer

Is there any method to reset the HTML text box in Selenium Webdriver?

Hey Anushka, you can use clear() function to ...READ MORE

answered Jun 25, 2019 in Selenium by Abha
• 28,140 points
1,797 views
0 votes
1 answer
0 votes
1 answer

Selenium WebDriver typing speed is slow in input text field

It worked for me in the 64bit ...READ MORE

answered Jun 1, 2018 in Selenium by Meci Matt
• 9,460 points
13,079 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,687 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,150 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,230 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,881 views
0 votes
1 answer

Maximizing the browser window in Selenium WebDriver using C#

Check this first: http://code.google.com/p/selenium/issues/detail?id=174 You Can use the JavascriptExector as follows: public ...READ MORE

answered May 2, 2018 in Selenium by Samarpit
• 5,910 points
1,162 views
+1 vote
1 answer

How to handle notifications in Python with Selenium (Chrome WebDriver)

Below will help you: You can disable the ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
14,434 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