This blog is for Automation Test Engineers

Saturday, 2 September 2017

How do you find the total no of objects in a webpage

 WebDriver driver=new FirefoxDriver();
driver.get("https://www.google.com");
List<WebElement>obj=driver.findElements(By.xpath("//*"));

System.out.println(obj.size());

0

0 comments:

Post a Comment