w3c / webdriver-bidi

Bidirectional WebDriver protocol for browser automation
https://w3c.github.io/webdriver-bidi/
336 stars 35 forks source link

Add action for scrolling to an element #544

Open jgraham opened 10 months ago

jgraham commented 10 months ago

During an action chain it's useful to be able to ensure that the element you want to interact with is actually visible. Currently that requires either making sure that all elements are in view before starting the action chain, or knowing exactly where to scroll during the action chain. We should have some way to scroll to a specific element as part of the action chain. This could be a separate null input source action, or could be a way to send wheel events until a specific element is in view.

whimboo commented 10 months ago

We potentially want to make sure that when we scroll an element into view that all the usual events are getting fired as well and can be handled by the web app. These should at least be scroll and scrollend.