I need to select an item from the dropdown menu.
For example:
<select id="fruits01" class="select" name="fruits"> <option value="0">Choose your fruits:</option> <option value="1">Banana</option> <option value="2">Mango</option> </select>
1) First I have to click on it. I will do it:
inputElementFruits = driver.find_element_by_xpath("//select[id='fruits']").click()
2) After that, I need to choose a good item, say, Mango .
I tried to do this with inputElementFruits.send_keys(...) but this did not work.
python selenium web-scraping selenium-webdriver webdriver
Adam Bovien Oct 23 '11 at 16:40 2011-10-23 16:40
source share