Skip to main content

Dropdown actions

I <select|deselect> the <position><st|nd|rd|th> option in <dropdown>

Selects an option in a dropdown by position.

Where

  • <select|deselect> is one of:

    • select to select the option
    • deselect to 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:

    • st if the position number ends in 1
    • nd if the position number ends in 2
    • rd if the position number ends in 3
    • th if 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.

Where

  • <select|deselect> is one of:

    • select to select the option
    • deselect to 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.

Where

  • <select|deselect> is one of:

    • select to select the option
    • deselect to 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.

Where

  • <select|deselect> is one of:

    • select to select the option
    • deselect to 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.

Where

  • <select|deselect> is one of:

    • select to select the option
    • deselect to 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