Scroll Element Into View does not always scroll element into view
See original GitHub issueIn this screen you can see a set or radio buttons, highlighted in red When these buttons are in view (top screenshot) I can click on them fine. However if they are not visible, because they are below the banner (bottom screenshot, highlighted in blue) I can’t click on them because then I get an error like: “Element is not clickable at point (111, 700). Other element would receive the click”
I tried to solve this by using keyword scroll element into view
. However in this case it doesn’t work. The keyword reports PASSED
but the element is not scrolled into view and I still get the error.
My suspicion is that the problem is that the radio button I want to click is still behind the banner highlighted in blue, even after scroll element into view
passes.
How do get this element to actually scroll into view?
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
I can reproduce the problem, my test page is based on this: https://www.w3schools.com/css/tryit.asp?filename=trycss_navbar_horizontal_black_fixed2 The
Scroll Element Into View
keyword only scrolls the element to the edge of the browser window. If there is those floating type of elements, Selenium does not scroll the element enough to be in view. I can produce the problem also in pure Selenium code. Also problem can be reproduced with many browsers, like Chrome and Firefox. I feel that the problem in lies in the Selenium or in the browser driver implementation side. I raised an issue the Selenium issue tracker: https://github.com/SeleniumHQ/selenium/issues/7159Have you looked at the Selenium testability plugin, it should have a keyword for this which works on JavaScript.