IsDisplayed returns false when element is position:fixed with parent overflow-y:hidden

Fixed Issue #11203904


Krzysztof P.
Mar 8, 2017
This issue is public.
Found in
  • Microsoft Edge
Found in build #
Fixed in build #
Reported by 7 people

Sign in to watch or report this issue.

Steps to reproduce

Consider the following HTML:

<div style="overflow-y: hidden">
   <div style="position: fixed" id="hello">Hello!</div>

When opened in Edge, this mark-up renders the string “Hello!” in the upper-left corner of the document. This is presumably correct, and consistent with how other browsers display it.

However, when I execute the following code with selenium-java (v. 2.47.0, also tried 3.2.0) to determine if the inner div is displayed:

RemoteWebDriver driver = new RemoteWebDriver(new URL("http://<my-modern-ie-machine>:4444/wd/hub"), DesiredCapabilities.edge());
WebElement helloElement = driver.findElement("hello"));
System.out.println(String.format("Hello element is displayed: %s", helloElement.isDisplayed()));

…which results in the following WebDriver commands…

07:16:07.424 INFO - Executing: [new session: Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}]])
07:16:07.455 INFO - Creating a new session for Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}]
[07:16:07.955] - Listening on http://localhost:12592/
07:16:10.409 INFO - Detected dialect: OSS
07:16:10.471 INFO - Done: [new session: Capabilities [{browserName=MicrosoftEdge, version=, platform=WINDOWS}]]
07:16:10.565 INFO - Executing: [get: http://<my-server>/index.html])
07:16:10.737 INFO - Done: [get: http://<my-server>/index.html]
07:16:10.769 INFO - Executing: [find element: hello])
07:16:10.847 INFO - Done: [find element: hello]
07:16:10.863 INFO - Executing: [is displayed: 0 [[EdgeDriver: MicrosoftEdge on ANY (26FEA7E5-7A38-4CDF-AE85-64DAA4E48176)] -> id: hello]])
07:16:10.893 INFO - Done: [is displayed: 0 [[EdgeDriver: MicrosoftEdge on ANY (26FEA7E5-7A38-4CDF-AE85-64DAA4E48176)] -> id: hello]]
07:16:10.963 INFO - Executing: [close window])
07:16:13.285 INFO - Done: [close window]

Then the result is consistently false, until I remove either overflow-y from the outer div, or position from the inner one.

Since the element remains visible with both of these properties set, I would rather expect WebDriver to return true in this case as well. Some other implementations of WebDriver (namely: IEDriver, FirefoxDriver, and ChromeDriver) work as expected.

For running the tests I use "Microsoft Edge on Win 10 Stable (14.14393)" virtual machine for VirtualBox from website. On this machine I use Selenium Standalone Server v. 3.2.0 with Microsoft WebDriver Release 14393.


0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

      Changed Assigned To from “Mara P.” to “Mustapha J.”

    • I am also having this issue. Resulting in elements not being found only in EDGE while other browsers pass using the same scripts.

    • Microsoft Edge Team

      Changed Title from “Webdriver incorrectly reports elements as not displayed in certain circumstances” to “incorrectly reports elements as not displayed in certain circumstances”

      Changed Status to “Confirmed”

      Changed Title from “incorrectly reports elements as not displayed in certain circumstances” to “IsDisplayed returns false when element is position:fixed with parent overflow-y:hidden”

      Changed Status from “Confirmed” to “Fixed”

      Changed Assigned To to “Clay M.”

    • This is fixed now in a low level branch and should be in a future insiders build.

    • I have found this issue when element is position:fixed with parent overflow:hidden, not specifically overflow-y:hidden. See below


      Does the fix also include this case?

      Environment: Windows 10 Microsoft Edge 15.15063, WebDriver 15063, Selenium 3.3.0

    • I am able to reproduce this and the problem is that if the element is not in “scroll view” it is returned as false, once it is scrolled into view it is returned as true.
      This does not happen with other webdriver like Chrome or Gecko.

      MicrosoftDriver version - 15.15063.0
      Edge version - 40.15063.0.0
      EdgeHTML version - 15.15063
      Windows 10 version - 1703, build 15063.138

    • @Microsoft Edge Team does this fix also solve Mr K.’s issue?
      I’m experiencing the same Problem.
      When will this fix be released?

    • I am also facing the same issue as Mr. K has mentioned.
      Can someone tell when this fix will be released?
      This is affecting me a lot. Thanks.

    • Any update on the issue?

    • @MICROSOFT EDGE TEAM, what is the current status of this issue? I am still facing this problem, any tentative release date?

    • @MICROSOFT EDGE TEAM - any tentative release date?


      It’s ridiculous that this not has not been release even though it is at a status of "FIXED, NOT FLIGHTED".

      For the record, I have not run any Selenium Automation tests against Edge since I commented in July last year.

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

    Sign in