Doesn't scroll to element on interaction

Not reproducible Issue #5207690

Details

Created
Oct 27, 2015
Privacy
This issue is public.
Reports
Reported by 5 people

Sign in to watch or report this issue.

Steps to reproduce

URL:

Repro Steps:

https://github.com/watir/watirspec/blob/master/button_spec.rb#L273

Expected Results:

Click command should first scroll element into view per: https://w3c.github.io/webdriver/webdriver-spec.html#element-click

Actual Results:

Dev Channel specific:

Yes

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Kamen M.”

      Changed Assigned To to “Christian F.”

      Changed Assigned To from “Christian F.” to “Mara P.”

      Changed Assigned To from “Mara P.” to “Ben B.”

      Changed Status to “Confirmed”

      Changed Title from “Edge Driver - Doesn't scroll to element on interaction” to “Doesn't scroll to element on interaction”

    • Have seen this as well with certain elements of our UI. For example, we have a large table where the first td element of each row has a checkbox in it. If I try to get the driver to click a checkbox that is not currently in view, it throws an exception because I am waiting on visibility of the element before I click it. Chrome and IE11 find these “not visible” elements just fine and then scroll them into view before clicking them.

    • Microsoft Edge Team

      Changed Assigned To from “Ben B.” to “Stanley H.”

    • What is the status of this issue? It is causing 10-15 failures every run in our test suite that work in every other browser except Edge due to this specific issue.

    • What is the status of this issue? Is there a known release date for a fixed version of WebDriver? This issue is highly annoying for our test suite.

    • Unfortunately there are no updates on the status of this bug, however we can confirm that it is reproducible. We’re working on prioritizing it for fixing once there are enough resources to do so. If possible, and I understand it is not always possible - we would suggest working around this problem until it is fixed by using ExecuteScript and scrolling the element into view before attempting interaction.

    • @Zach I have the same issue and used the workaround Stanley mentioned. It’s a workaround that does not break the other tests for me, so might be worth the time if it’s to annoying.

    • I encounter the same issue with Edge 15.15063
      Watir users you could use the watir-scroll gem.
      OR use the javascript way to scroll browser.execute_script('arguments[0].scrollIntoView();', button)
      Both seem to do the workaround trick for me.

    • Microsoft Edge Team

      Changed Status from “Confirmed” to “Not reproducible”

    • We now scroll the element into view on element interaction. This was fixed by a different change a while ago.

    • Closing as Not Repro as I don’t have the specific bug on hand to dupe it to.

    • For some of elements ,JS Exector - scrollIntoView(true) still not navigating to that element.In my case, i used "window.scrollBy(0, -1000)" to navigate from bottom to top and the element is getting clicked.

      But this is not the case for all elements in Edge browser.The behaviour is weird , where above mentioned Js executor not working for some of elements in Edge browser

      I am facing this problem only with Edge browser.

    • Still having this issue on the latest stable Edge and EdgeDriver release. A little more information about my specific instance:

      We have a table that is part of the larger UI. The larger UI does not have scroll bars, however, the table within the UI does. Elements in this table that are “not in view” (meaning, they aren’t scrolled into view in the table), are not found by EdgeDriver unless I breakpoint before the point of interaction in my test case and manually scroll the element into view. Adding in JS execution to our test suite code is not feasible at this point. Every other browser is able to scroll these types of tables (and dropdown lists) just fine to “find” these elements that are "not visible". Don’t know why Edge can’t do this very simple thing still.

    • Hi,
      I am facing the same scroll issue for a script that works fine in IE 11. The Win 10 OS build version 17134 matches with the EdgeWebDriver version. The page would not scroll down to a already visible element and instead throws exception that the Element is not visible.

      Please share if there is a workaround.

    • @undefined u,

      I have been in contact with one of the devs over at MS. He has confirmed that in the current version of Edge, the isDisplayed command is being calculated differently from all other browsers. It has something to do with how Selenium recognizes this version of Edge as being either W3C or JWP compliant. In the next version of Edge (RS5), I have been told that this issue should be fixed. However, there is no confirmed release date for that update. It will come when MS gives it to us. I have not found a suitable workaround, but the one posted about above regarding executing JS to scroll the element into view before interaction may work for you. It was not feasible for me.

    You need to sign in to your Microsoft account to add a comment.

    Sign in