Uploaded January 2024 | Updated September 2026, 1 week ago
Sometimes an option can have characters that break the cy.select command. This video shows how you can escape the selector and change the value by invoking the jQuery "attr" method on the option. You should also make sure the element is visible and enabled before acting on it to make sure you act like a human user. Find the full source code at glebbahmutov.com/cypress-examples/recipes/selected-value.html
Sometimes an option can have characters that break the cy.select command. This video shows how you can escape the selector and change the value by invoking the jQuery "attr" method on the option. You should also make sure the element is visible and enabled before acting on it to make sure you act like a human user. Find the full source code at glebbahmutov.com/cypress-examples/recipes/selected-value.html










