So i ran into a dropdown that has a option selected by default. in the html it says “value selected”. I try selecting the other option by its value and its index but nothing is working for me. There is only two options to select from, Any ideas?
Firstly, a question: How does a regular user select a different option?
If this is a regular HTML
select element, you could use
sendKeys and send a
space to it. Sounds tricky though.
It didn’t work for me i received and error
:You may only deselect options of a multi-select)
This is a regular
select element – as long as there is no surrounding styling that makes it invisible and uses framework to mimic a select. From the HTML you’ve managed to share, it’s a regular select. So…
You shouldn’t need to deselect. You should be able to use the regular
for some reason it would only work if i used select by Label. Got it to work and thanks for your help!