Select Dropdown by Label
You can also select by the visible label text using selectOption({ label: 'text' }).
Task:
- Navigate to
https://testkru.com/Elements/Dropdowns - Select the option with label "JavaScript" from
#singleSelect - Print the selected value attribute
- Select the option with label "Ruby"
- Print the selected value attribute
Expected output:
First selection value: javascript Second selection value: ruby
TestKru