Unable to select an option using Selenium’s Python WebDriver
I would like to select an <option> child of a <select> using the Python
WebDriver. I have a reference to the option
WebElement I wish to select, and have tired
click() but neither work. What is the correct way to select an ?
Update: Oh dearie me, I just slapped my forehead. Of course it works, it was my fault for calling
click() on the default option, which made it look like nothing had changed.
Update 2: My test doesn’t work with
option.click(), but it does work with
option.select(). In the latest webelement.py source,
select has been removed, and
click must be used in it’s place. It will be interesting to see if my test works with the latest release.