Questions
How do I do this with Selenium Web DriverMy test steps are-
a) go to google.com b) in the search box start typing a keyword example "IBM" c) google displays all the matching results d) Get the count of matching results in a List of strings
- a) go to google.com
- b) in the search box start typing a keyword example "IBM"
- c) google displays all the matching results
- d) Get the count of matching results in a List of strings.
for (a), (b) I have:-
System.setProperty("webdriver.chrome.driver", "C:\\Work\\chromedriver.exe");
WebDriver driver = new ChromeDriver();
driver.get("http://www.google.com");
WebElement element = driver.findElement(By.name("q"));
element.sendKeys("IBM");
System.setProperty("webdriver.chrome.driver", "C:\Work\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("http://www.google.com"); WebElement element = driver.findElement(By.name("q")); element.sendKeys("IBM"); How doThe Question is how I do (d)?