[Solved] How to count total number of products on webpage and verify if those are correct with Selenium webdriver in Java? [closed]
[ad_1] The below java code will help you do the task Here we create a driver instance go to the website url take all the products into a list and compare it with the text “1-15 of 38 Matching Products” public static void main(String[] args) { WebDriver driver=new FirefoxDriver(); driver.get(“http://www.samsung.com/us/video/home-audio/all-products”); List products = driver.findElements(By.className(“product-image”)); String … Read more