Const
Call this InteractorConstructor to initialize a slider Interactor. The slider interactor can be used to interact with sliders on the page and to assert on their state.
The slider is located by the label or the aria-label attribute.
aria-label
await Slider('Submit').click();await Slider('Submit').is({ disabled: true });await Slider({ id: 'submit-slider', disabled: true }).exists(); Copy
await Slider('Submit').click();await Slider('Submit').is({ disabled: true });await Slider({ id: 'submit-slider', disabled: true }).exists();
id
visible
true
disabled
false
orientation
horizontal
vertical
minValue
maxValue
value
textValue
min
max
focus()
blur()
decrease(steps: number = 1)
increase(steps: number = 1)
setMin()
setMax()
setValue(value: number)
Call this InteractorConstructor to initialize a slider Interactor. The slider interactor can be used to interact with sliders on the page and to assert on their state.
The slider is located by the label or the
aria-label
attribute.Example
Filters
id
: string – Filter by idvisible
: boolean – Filter by visibility. Defaults totrue
. See isVisible.disabled
: boolean – Filter by whether the slider is disabled. Defaults tofalse
.orientation
: horizontal | vertical - Filter by orientationhorizontal
: boolean - Filter by whether the slider has horizontal orientationvertical
: boolean - Filter by whether the slider has vertical orientationminValue
: number - Filter by the least possible valuemaxValue
: number - Filter by the greatest possible valuevalue
: number - Filter by the current valuetextValue
: string - Filter by the text representation of current valuemin
: boolean - Filter by whether the slider value is equalminValue
max
: boolean - Filter by whether the slider value is equalmaxValue
Actions
focus()
: Interaction – Move focus to the sliderblur()
: Interaction – Move focus away from the sliderdecrease(steps: number = 1)
: Interaction – Decrease slider value by specific stepsincrease(steps: number = 1)
: Interaction – Increase slider value by specific stepssetMin()
: Interaction - Set value to the least possiblesetMax()
: Interaction – Set value to the greatest possiblesetValue(value: number)
: Interaction – Set current value