Wednesday 16 January 2013

How to select a value from the dropdown using selenium Webdriver?

How to select a value in the dropdown using selenium Webdriver?

Use the Below code:

import org.openqa.selenium.support.ui.Select;
                                 
Select droplist = new Select(driver.findElement(By.xpath("//*[@id='ddlrecurrencetype']")));
droplist.selectByVisibleText("Weekly");

No comments:

Post a Comment