This blog is for Automation Test Engineers

Saturday, 2 September 2017

Count no of options present in listbox

WebDriver driver=new FirefoxDriver();
driver.get("https://www.facebook.com/");
WebElement Day=driver.findElement(By.id("day");
Select sel=new Select(box);
List<WebElement>list=sel.getOption();
System.out.println(list);
for(int i=0;i<list.size();i++){
System.our.println(list.size());



}



}
0

0 comments:

Post a Comment