Skip to content

Add a way to clear selection with cy.select() #4318

@flotwig

Description

@flotwig

This Stack Overflow question points out that cy.select() can't clear a selection, and apparently, neither can commands like cy.clear(): https://stackoverflow.com/questions/56340978/how-do-i-clear-a-select-input-using-cypress

Things that should work, but don't:

  • cy.select([]) should cause no elements to be selected
  • cy.clear() with a <select> subject should cause no elements to be selected

Also, maybe cy.select() or cy.select(undefined) should also clear the selection.

Metadata

Metadata

Labels

good first issueGood for newcomerspkg/driverThis is due to an issue in the packages/driver directorytype: enhancementRequested enhancement of existing feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions