webdriverio: Can't get the sected options of a
Sorry, I tried .element, .elements, .getSelected with no success.
Java and C# drivers have a getFirstSelected()
Is it possible to get the selected options with webdriver.js ? If not, should it be added ?
Note : S/O question : http://stackoverflow.com/q/22153812/587407
About this issue
- Original URL
- State: closed
- Created 10 years ago
- Comments: 16 (5 by maintainers)
I like using the value to retrieve the text:
Hi @Yvem
yeah it is possible. Lets say we have the following
<select>element:You get the current selected option by using
getValueand you can change the selection by usingclick. Here is an simple example:Hope that helps.
cheers