selectBox = self.driver.find_element_by_xpath(select_pension_locators)options = selectBox.find_elements(by=By.TAG_NAME, value="option")
myoption = options[1]
Use the Select (or SelectElement in .Net) object e.g.:
WebElement foo = driver.findElement(By.xpath("//select"));
Select se = new Select(foo);
se.selectByVisibleText("<textOfOptionToSelect>");
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/rTZofUEcMgMJ.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.
Selenium 2 * Removed toggle() and select() Selenium 2 RC 3 * Added Opera to Desired Capabilities * Removed deprecrated methods * Deprecated toggle() and select() methods. This will be removed in the next release