Description
When using the .select() command, you can pass in a value or text that doesn't exist in the select's options. The command log performs normally as if the option was selected, although it was not.
Code
<select>
<option value="foo">Foo</option>
</select>
cy.get("select").select("baz")
No error will be thrown with the above code.
Additional Info
It is additionally possible to set <option> as disabled. The .select() command should thrown an error if attempting to select a disabled option.
Description
When using the
.select()command, you can pass in a value or text that doesn't exist in the select's options. The command log performs normally as if the option was selected, although it was not.Code
No error will be thrown with the above code.
Additional Info
It is additionally possible to set
<option>asdisabled. The.select()command should thrown an error if attempting to select a disabled option.