kgress / scaffold

A Java based Selenium WebDriver abstraction
MIT License
4 stars 7 forks source link

Update scrollintoView logic to bring it into view, not snap to #119

Closed kgress-heb closed 2 years ago

kgress-heb commented 2 years ago

Summary

Currently, the scroll into view script in Scaffold will scroll an element into the middle of the view. This was a fix implemented to an issue with how elements would scroll elements into the top of the view.

Technically, either functionality isn't ideal. The best case scenario for scrolling into view is to bring the element into view with the least distance required. For example, if a user would like to click a button that exists down the web page, we should scroll the element into view where the element will be at the bottom of the screen.

We should also think about whether or not we need to scroll elements into view prior to clicking them. Some experimentation should be done to try different implementations.

A/C