Cypress handles static dropdowns with the
help of select() command.
For a static dropdown, the tag name of the element should be
its child elements should have the tag name
Before version 8.5.0,
the value argument could be the
value or the text content of the
<option> to be selected
Consider the following snippet to understand the
select command and its usage better.
Now to select a particular option,
we can either use its value or the text content
With the updated Cypress 8.5.0,
we can now select an option by index within the .select() command.
If we try to give a negative index,
a non-integer index,
or an out-of-range index then
Cypress will throw an error.
To know more check out this