webdriver icon indicating copy to clipboard operation
webdriver copied to clipboard

Scroll into view: scroll position `end` vs. `center`

Open christian-bromann opened this issue 3 years ago • 0 comments

The spec currently says that before interacting with an element, it needs to be scrolled into view:

To scroll into view an element perform the following steps only if the element is not already in view:

Let options be the following ScrollIntoViewOptions:

Logical scroll position "block" "end" Logical scroll position "inline" "nearest"

I would like to propose to change the position block from end to center given that many applications have fixed positioned elements at the bottom the screen, e.g.

  • a footer element
  • a cookie compliance model (e.g. https://amazone.de/de-de/)
  • some sort of check out modal (e.g. https://coffee-cart.netlify.app/)

I'ld argue scrolling the element into the center of the viewpoint has higher chances that there are less elements that could be blocking the interaction causing element click intercepted errors.


Preview | Diff

christian-bromann avatar Aug 25 '22 07:08 christian-bromann