* {{> dragSlider }} *
(locator, offsetX = 0)
| 2871 | * |
| 2872 | */ |
| 2873 | async dragSlider(locator, offsetX = 0) { |
| 2874 | const src = await this._locateElement(locator) |
| 2875 | assertElementExists(src, locator, 'Slider Element') |
| 2876 | |
| 2877 | // Note: Using clickablePoint private api because the .BoundingBox does not take into account iframe offsets! |
| 2878 | const sliderSource = await clickablePoint(src) |
| 2879 | |
| 2880 | // Drag start point |
| 2881 | await this.page.mouse.move(sliderSource.x, sliderSource.y, { steps: 5 }) |
| 2882 | await this.page.mouse.down() |
| 2883 | |
| 2884 | // Drag destination |
| 2885 | await this.page.mouse.move(sliderSource.x + offsetX, sliderSource.y, { steps: 5 }) |
| 2886 | await this.page.mouse.up() |
| 2887 | |
| 2888 | return this._waitForAction() |
| 2889 | } |
| 2890 | |
| 2891 | /** |
| 2892 | * {{> grabAttributeFrom }} |
nothing calls this directly
no test coverage detected