I have the following drop-down list:
<select id="cities" name="cities">
<option value="paris">Paris</option>
<option value="london">London</option>
<option value="rome">Rome</option>
</select>
I am writing integration tests in Elixir with Hound and I'd like to select an element from the list above before submitting my form. Can I do that with Hound?
I couldn't find anything about drop-down lists in the Hound documentation.
Currently there is no Hound function dedicated to selecting an element from a drop-down list.
However, you can use
find_element/3
to find the element that corresponds to the option value you want to select, then feed this element toclick/1
to select it:More information on this GitHub issue
Implementation example