robotframework / SeleniumLibrary

Web testing library for Robot Framework
Apache License 2.0
1.39k stars 765 forks source link

'Scroll Element Into View' is broken on Firefox #1780

Open Brownies opened 2 years ago

Brownies commented 2 years ago

Steps to reproduce the issue

Expected behavior and actual behavior

When I follow those steps, I see... Gist with trace level log output, stack trace and sample .robot and .html files

I was expecting the element to be scrolled into view. This does work on Chromium, both headless and normal.

Environment

Browser: Firefox 103.0 Browser driver: geckodriver 0.31.0 Operating System: Linux, Ubuntu 20.04 Libraries

Brownies commented 2 years ago

A likely culprit seems to be the keyword itself which uses ActionChains.move_to_element instead of ActionChains.scroll_to_element.

everlighting commented 2 years ago

Is some one following up? When this issue will be released? Once this issue is fixed we can remove the JS in our script

Brownies commented 1 year ago

I'll see if I can fix this and get the acceptance tests running on Firefox too.

Brownies commented 1 year ago

Bad news, switching to ActionChains.scroll_to_element does not fix the problem. It's also present with RF 6 and selenium 4.7.2 with Firefox 108. Maybe this is a Selenium or Geckodriver problem?

Brownies commented 1 year ago

Yeah, this is an ancient Geckodriver issue and they will not fix it until W3C updates the WebDriver spec: https://github.com/mozilla/geckodriver/issues/776#issuecomment-355086173 Might as well close this issue because the problem is not in SeleniumLibrary and judging by the rate of recent commits the spec update is going to take an eternity.