From 8c0915ad026c340e6c88ed50466de20228d2cf4b Mon Sep 17 00:00:00 2001 From: David Munechika Date: Wed, 6 Oct 2021 09:06:11 -0400 Subject: [PATCH 1/5] Add note about unselecting all selected options with cy.select([]) (#4134) --- content/api/commands/select.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/content/api/commands/select.md b/content/api/commands/select.md index 170e8c3be9..f9a42a0425 100644 --- a/content/api/commands/select.md +++ b/content/api/commands/select.md @@ -159,6 +159,12 @@ cy.get('select') .should('deep.equal', ['456', '457']) ``` + + +**Note:** Passing an array into `cy.select()` will select only the options matching values in the array, leaving all other options unselected (even those that were previously selected). In the same manner, calling `cy.select([])` with an empty array will clear selections on all options. + + + ### Force select #### Force select a hidden `