Returns the current value of the slider.
(
slider: webdriver.WebElement,
thumbPosition: Thumb,
)
| 127 | |
| 128 | /** Returns the current value of the slider. */ |
| 129 | async function getSliderValue( |
| 130 | slider: webdriver.WebElement, |
| 131 | thumbPosition: Thumb, |
| 132 | ): Promise<number> { |
| 133 | const inputs = await slider.findElements(webdriver.By.css('.mdc-slider__input')); |
| 134 | return thumbPosition === Thumb.END |
| 135 | ? Number(await inputs[inputs.length - 1].getAttribute('value')) |
| 136 | : Number(await inputs[0].getAttribute('value')); |
| 137 | } |
| 138 | |
| 139 | /** Focuses on the MatSlider at the coordinates corresponding to the given thumb. */ |
| 140 | async function focusSliderThumb( |
no test coverage detected