I have a text box in which when I type one letter say \'s\' , it displays a list of results ( like google search) .
I am using latest selenium webdriver with java. <
I found a workaround about this. My problem was:
What I did was:
driver.findElement(By.name("fromLocation")).sendKeys("Mandaluyong");
driver.findElement(By.name("fromLocation")).sendKeys(Keys.TAB);
This is because on a manual test, when I try to press TAB key, two things were done by the system:
I believe you are testing auto-suggest here (not auto-complete)
Steps I follow -
This should be a temporary workaround for now.
WebDriver driver = new FirefoxDriver();
driver.get("http://www.kayak.com/");
DefaultSelenium sel = new WebDriverBackedSelenium(driver,"http://www.kayak.com/");
sel.type("//input[@id='destination']", "s");
sel.fireEvent("//input[@id='destination']", "keydown");