My 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.
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");
The Question is how I do (d)?