Selenium WebDriver: Working with a AutoSuggest box
In this blog post , let us see how Mr.Web Driver is going to handle an Auto Suggest box . First and foremost point to be noted is when you type a character(or) text in the auto suggest box.we need to wait till application shows up some suggestions starting (or) containing the typed character. In the below illustrated example , Mr.Web Driver gives us an option to wait(using Explicit wait) until the suggestions are visible. public class Suggestbox { WebDriver driver=new FirefoxDriver(); @Test public void cool() throws InterruptedException { driver.get("http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwSuggestBox"); driver.manage().window().maximize(); WebDriverWait wait=new WebDriverWait(driver,10); wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.id("gwt-debug-cwSuggestBox"))); //ENTER SOME VALUE IN SUGGEST BOX driver.findElement(By....