Cypress · Junior · Question 14 of 75

How do you select an option in a native <select>?

Show the answer

Correct answer: cy.get('select').select('Blue')

Explanation

.select() accepts the option's text, value or index. Custom dropdowns are tested with clicks.

Further reading

Problem with a question

Cypress · Junior · question 14

Test yourself

Take the Cypress · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz