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 select() and click() but neither work. What is the correct way to select an

I have also posted this question on the Software Quality Assurance & Testing site on Stack Exchange.

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][3] 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.

[3]: http://code.google.com/p/selenium/source/detail?r=12729&path=/trunk/py/selenium/webdriver/remote/webelement.py