Can’t select a drop down in Selenium IDE

selenium-ide

I'm trying to automate selecting a dropdown in selenium ide, but I haven't been able to get it to work.

Basically, I record a click on the menu item, which reveals the drop down, but whenever I use the click command on one of the options, it closes the menu without ever selecting the new option. I've also tried the select command but I keep getting "specified element is not a select"

any ideas?

Best Answer

Selenium should be returning a single action when interacting with HTML select elements.

For example, if I had the following select element

<select name="numbers">
   <option value="One">1</option>
   <option value="Two">2</option>
   <option value="Three">3</option>
</select>

And selected "2", selenium should return a single action.

 | Command       | Target       | Value     |
 | select        | name=numbers | label=Two |

If the IDE is not recording the event, you may be running into another issue such as the element being defined as hidden. Without additional details though, it's really hard to say.

Related Topic