Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Brownies opened this issue Aug 22, 2022 · 5 comments
Open

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

Brownies opened this issue Aug 22, 2022 · 5 comments

Comments

@Brownies
Copy link
Member

Steps to reproduce the issue

  • Open a page in Firefox such that some element is not inside the viewport
  • Try to scroll to the element with 'Scroll Element Into View'

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

  • Robot Framework: 5.0
  • Selenium: 4.1.3 / 4.4.3
  • SeleniumLibrary: 6.0.0
  • Interpreter: CPython 3.8.10
@Brownies
Copy link
Member Author

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

@everlighting
Copy link

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
Copy link
Member Author

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

@Brownies
Copy link
Member Author

Brownies commented Dec 22, 2022

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
Copy link
Member Author

Yeah, this is an ancient Geckodriver issue and they will not fix it until W3C updates the WebDriver spec: mozilla/geckodriver#776 (comment)
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants