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

Fixed, not yet flighted Issue #11203904

Details

Author
Krzysztof P.
Created
Mar 8, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
14.14393
Reports
Reported by 3 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>
</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());
driver.navigate().to("http://<my-server>/index.html");
WebElement helloElement = driver.findElement(By.id("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: By.id: hello])
07:16:10.847 INFO - Done: [find element: By.id: 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 modern.ie website. On this machine I use Selenium Standalone Server v. 3.2.0 with Microsoft WebDriver Release 14393.

Attachments

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

      
        
        
      
        
          
            Hello
      
          
      
        
      
      
      
      

      Does the fix also include this case?

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

    • Microsoft Edge Team

      Changed Status from “Fixed” to “Fixed, not yet flighted”

    • 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

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

    Sign in