Category Archives: auto population

How to get auto populated Google search result?

Getting auto populated Google search result Using below logic you can get the auto populated search result (Google search) for your search word Logic driver.get(“http://www.google.co.in”); driver.findElement(By.name(“q”)).sendKeys(“Test”); List autoPopulatedList=driver.findElements(By.cssSelector(“tr>td>span”)); for(WebElement ele:autoPopulatedList) { System.out.println(e.getText()); } Example Output of given code for above … Continue reading

Posted in auto population, Automation, findElements, GoogleSearchResult, WebDriver | Leave a comment