This blog is for Automation Test Engineers

Sunday, 27 August 2017

How to handle List box in selenium


WebDriver driver=new FirefoxDriver();
driver.get("https://www.facebook.com/");
WebElement box=driverfindElement(By.id("day"));
Select sel=new Select(box);
sel.SelectByIndex(1);
sel.SelectByVisibleText("Mar");
sel.SelectByValue("Oct");

0

0 comments:

Post a Comment