Const
Call this InteractorConstructor to initialize a select Interactor. The select interactor can be used to interact with selects with the multiple attribute and to assert on their state.
multiple
See Select for an interactor for single select.
The multi select is located by the text of its label.
await MultiSelect('Language').select('English');await MultiSelect('Language').select('German');await MultiSelect('Language').deselect('Swedish');await MultiSelect('Language').has({ values: ['English', 'German'] }); Copy
await MultiSelect('Language').select('English');await MultiSelect('Language').select('German');await MultiSelect('Language').deselect('Swedish');await MultiSelect('Language').has({ values: ['English', 'German'] });
id
valid
required
description
value
disabled
false
click()
focus()
blur()
choose(text: string)
select(text: string)
deselect(text: string)
Call this InteractorConstructor to initialize a select Interactor. The select interactor can be used to interact with selects with the
multiple
attribute and to assert on their state.See Select for an interactor for single select.
The multi select is located by the text of its label.
Example
Filters
id
: string – Filter by idvalid
: boolean – Filter by whether the select is valid.required
: boolean – Filter by whether the select is required.description
: string – Filter by description.value
: string – Filter by the text of the selected option.disabled
: boolean – Filter by whether the select is disabled. Defaults tofalse
.Actions
click()
: Interaction – Click on the multi selectfocus()
: Interaction – Move focus to the multi selectblur()
: Interaction – Move focus away from the multi selectchoose(text: string)
: Interaction – Choose the option with the given text from the multi select. Will deselect all other selected options.select(text: string)
: Interaction – Add the option with the given text to the selection.deselect(text: string)
: Interaction – Remove the option with the given text from the selection.