This blog is for Automation Test Engineers

Sunday, 27 August 2017

How to Deselect options in Listbox


Webdriver driver=new FirefoxDriver();
driver.get("https://www.facebook.com/");
WebElement box=driver.findElement(By.id("month"));
Select sel=new Select(box);
sel.deselectbByValue("Jul");
sel.deselectByVisibleText("Aug");
sel.deselectByindex(5);
sel.deselectAll();
}

0

0 comments:

Post a Comment