#cy.selectionType()
// How user selection composes: 'single' (a tap or box replaces the selection) or 'additive' (taps toggle and boxes add, as if a multiple-select key were always held)
cy.selectionType(): 'single' | 'additive'How user selection composes: 'single' (a tap or box replaces the selection) or 'additive' (taps toggle and boxes add, as if a multiple-select key were always held).
Returns
'single' | 'additive'the current selectionType value
Throws
if type is neither 'single' nor 'additive'
#cy.selectionType(type)
// How user selection composes: 'single' (a tap or box replaces the selection) or 'additive' (taps toggle and boxes add, as if a multiple-select key were always held)
cy.selectionType(type: 'single' | 'additive'): thisHow user selection composes: 'single' (a tap or box replaces the selection) or 'additive' (taps toggle and boxes add, as if a multiple-select key were always held).
| Name | Description |
|---|---|
type: 'single' | 'additive' | the new mode |
Returns
thisthis core, for chaining
Example
const result = cy.selectionType("single");console.log(result === cy); // trueThrows
if type is neither 'single' nor 'additive'