This blog is for Automation Test Engineers

Sunday, 27 August 2017

How to check whether list is dropdown list or multiple select list


Webdriver driver=new FirefoxDriver();
driver.get("https://www.facebook.com/");
WebElement ele=driver.findElement(By.id("month"));
Select sel=new Select(ele);
if(sel.isMultiple()){
System.out.print("it is multiselect list box");
}
else{
System.out.print("it is dropdown box");
}


Output:it is dropdown box



0

0 comments:

Post a Comment