Dropdown actions
I <select|deselect> the <position><st|nd|rd|th> option in <dropdown>
Selects an option in a dropdown by position.
I <select|deselect> the <position><st|nd|rd|th> option in <dropdown>
Where
<select|deselect>is one of:selectto select the optiondeselectto deselect the option, since v2.13.0- Note: Deselect will only work for multi-select dropdowns.
<position>is the position number of the option(1 for first position)<st|nd|rd|th>is one of:stif the position number ends in 1ndif the position number ends in 2rdif the position number ends in 3thif the position number is greater than 3
<dropdown>is the name of the dropdown element
Example
Given the age dropdown can be located by id "challenger_age"
When I navigate to "https://challengers.flood.io/step/2"
And I select the 2nd option in the age dropdown
I <select|deselect> "<option>" in <dropdown>
Selects an option in a dropdown by displayed text.
I <select|deselect> "<option>" in <dropdown>
Where
<select|deselect>is one of:selectto select the optiondeselectto deselect the option, since v2.13.0- Note: Deselect will only work for multi-select dropdowns.
<option>is the displayed option text<dropdown>is the name of the dropdown element
Example
Given the age dropdown can be located by id "challenger_age"
When I navigate to "https://challengers.flood.io/step/2"
And I select "18" in the age dropdown
I <select|deselect> <optionRef> in <dropdown>
Selects an option in a dropdown by a displayed text reference.
I <select|deselect> <optionRef> in <dropdown>
Where
<select|deselect>is one of:selectto select the optiondeselectto deselect the option, since v2.13.0- Note: Deselect will only work for multi-select dropdowns.
<optionRef>is the name of the binding containing the displayed option text- Can be the name of any binding that contains or resolves to a text value, including a web element in which case the text in the element will be dynamically retrieved and used.
<dropdown>is the name of the dropdown element
Example
Given the age dropdown can be located by id "challenger_age"
And my age is "24"
When I navigate to "https://challengers.flood.io/step/2"
And I select my age in the age dropdown
I <select|deselect> "<option>" in <dropdown> by value
Selects an option in a dropdown by hidden value.
I <select|deselect> "<option>" in <dropdown> by value
Where
<select|deselect>is one of:selectto select the optiondeselectto deselect the option, since v2.13.0- Note: Deselect will only work for multi-select dropdowns.
<option>is the hidden option value<dropdown>is the name of the dropdown element
Example
Given the age dropdown can be located by id "challenger_age"
When I navigate to "https://challengers.flood.io/step/2"
And I select "21" in the age dropdown by value
I <select|deselect> <optionRef> in <dropdown> by value
Selects an option in a dropdown by hidden value reference.
I <select|deselect> <optionRef> in <dropdown> by value
Where
<select|deselect>is one of:selectto select the optiondeselectto deselect the option, since v2.13.0- Note: Deselect will only work for multi-select dropdowns.
<optionRef>is the name of the binding containing the hidden option value- Can be the name of any binding that contains or resolves to a text value, including a web element in which case the text in the element will be dynamically retrieved and used.
<dropdown>is the name of the dropdown element
Example
Given the age dropdown can be located by id "challenger_age"
And the age is "24"
When I navigate to "https://challengers.flood.io/step/2"
And I deselect the age in the age dropdown