-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Description
Is your feature request related to a problem?
Currently scrolling should be implemented in test level.
For example if i'd like to move pointer to element with scrolling I should do not so obvious action like scrolling because element can be shifted for some reason.
- moveTo
await (await browser.$("#root div.theme-switcher-menu > button > span")).scrollIntoView()
await browser.pause(animationTimeout)
await (await browser.$("#root div.theme-switcher-menu > button > span")).moveTo()
- w3c click with x,y
await (await browser.$("#root div.theme-switcher-menu > button > span")).scrollIntoView()
await browser.pause(animationTimeout)
await (await browser.$("#root div.theme-switcher-menu > button > span")).click({x: 1, y: 1})
- for dragAndDrop it can't be performed because of current implementation
const browser = getBrowserObject(this);
return browser.action('pointer')
.move({ duration: 0, origin, x: 0, y: 0 })
.down({ button: ACTION_BUTTON })
.pause(10)
.move({ duration, origin: targetOrigin, x: targetX, y: targetY })
.up({ button: ACTION_BUTTON })
.perform();
Describe the solution you'd like.
I'd like to suggest add scrollIntoView by default to the methods and some arguments for parametrizing the behavior.
- moveTo
just with arguments by default
await (await browser.$("#root div.theme-switcher-menu > button > span")).moveTo()
and with preset arguments
await (await browser.$("#root div.theme-switcher-menu > button > span")).moveTo({x: 10, y: 10, scrollOptions: options})
- the same for w3c clicking with x,y
- and maybe for dnd if it possible to iterate with the same 'pointer' after using 'wheel'
Describe alternatives you've considered.
No response
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct
Reactions are currently unavailable