reports element as not displayed

Confirmed Issue #9126988 • Assigned to Ben B.

Details

Author
Paul B.
Created
Sep 29, 2016
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
25.10586
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

I have a webpage with a nested div. At the parent level, the div’s size is (1000x0), but the div itself has a valid size, and I can see that it renders correctly on the page. Selenium reports that the element exists, and has a location as expected. However, any action which checks to see if it’s displayed (click, for example), fails.

This is using SauceLabs to drive Win10 / Edge 25. The error is like this:

{
  "hCode": 16597436,
  "stackTrace": [
    {
      "methodName": "newInstance0",
      "fileName": null,
      "className": "sun.reflect.NativeConstructorAccessorImpl",
      "nativeMethod": true,
      "lineNumber": -2,
      "hCode": 513928194,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "newInstance",
      "fileName": null,
      "className": "sun.reflect.NativeConstructorAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -432498851,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "newInstance",
      "fileName": null,
      "className": "sun.reflect.DelegatingConstructorAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -2147429624,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "newInstance",
      "fileName": null,
      "className": "java.lang.reflect.Constructor",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -1851634561,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "createThrowable",
      "fileName": "ErrorHandler.java",
      "className": "org.openqa.selenium.remote.ErrorHandler",
      "nativeMethod": false,
      "lineNumber": 206,
      "hCode": 514255488,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "throwIfResponseFailed",
      "fileName": "ErrorHandler.java",
      "className": "org.openqa.selenium.remote.ErrorHandler",
      "nativeMethod": false,
      "lineNumber": 158,
      "hCode": 1091067085,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "execute",
      "fileName": "RemoteWebDriver.java",
      "className": "org.openqa.selenium.remote.RemoteWebDriver",
      "nativeMethod": false,
      "lineNumber": 678,
      "hCode": 1767885165,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "execute",
      "fileName": "RemoteWebElement.java",
      "className": "org.openqa.selenium.remote.RemoteWebElement",
      "nativeMethod": false,
      "lineNumber": 327,
      "hCode": -1473293558,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "click",
      "fileName": "RemoteWebElement.java",
      "className": "org.openqa.selenium.remote.RemoteWebElement",
      "nativeMethod": false,
      "lineNumber": 85,
      "hCode": 478209899,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke0",
      "fileName": null,
      "className": "sun.reflect.NativeMethodAccessorImpl",
      "nativeMethod": true,
      "lineNumber": -2,
      "hCode": 703090916,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "sun.reflect.NativeMethodAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -1217602907,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "sun.reflect.DelegatingMethodAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 506642458,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "java.lang.reflect.Method",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 708160817,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": "EventFiringWebDriver.java",
      "className": "org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement$1",
      "nativeMethod": false,
      "lineNumber": 335,
      "hCode": 1557030889,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "click",
      "fileName": null,
      "className": "com.sun.proxy.$Proxy2",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -384132370,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "click",
      "fileName": "EventFiringWebDriver.java",
      "className": "org.openqa.selenium.support.events.EventFiringWebDriver$EventFiringWebElement",
      "nativeMethod": false,
      "lineNumber": 348,
      "hCode": -1031043917,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke0",
      "fileName": null,
      "className": "sun.reflect.NativeMethodAccessorImpl",
      "nativeMethod": true,
      "lineNumber": -2,
      "hCode": 703090916,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "sun.reflect.NativeMethodAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -1217602907,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "sun.reflect.DelegatingMethodAccessorImpl",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 506642458,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": null,
      "className": "java.lang.reflect.Method",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 708160817,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "invoke",
      "fileName": "KnownElements.java",
      "className": "org.openqa.selenium.remote.server.KnownElements$1",
      "nativeMethod": false,
      "lineNumber": 64,
      "hCode": -2017324380,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "click",
      "fileName": null,
      "className": "com.sun.proxy.$Proxy3",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -384102579,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "call",
      "fileName": "ClickElement.java",
      "className": "org.openqa.selenium.remote.server.handler.ClickElement",
      "nativeMethod": false,
      "lineNumber": 30,
      "hCode": -835585793,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "call",
      "fileName": "ClickElement.java",
      "className": "org.openqa.selenium.remote.server.handler.ClickElement",
      "nativeMethod": false,
      "lineNumber": 1,
      "hCode": -835585822,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "run",
      "fileName": null,
      "className": "java.util.concurrent.FutureTask",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 424519275,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "run",
      "fileName": "DefaultSession.java",
      "className": "org.openqa.selenium.remote.server.DefaultSession$1",
      "nativeMethod": false,
      "lineNumber": 176,
      "hCode": -255143467,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "runWorker",
      "fileName": null,
      "className": "java.util.concurrent.ThreadPoolExecutor",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -1208971944,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "run",
      "fileName": null,
      "className": "java.util.concurrent.ThreadPoolExecutor$Worker",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": -166011880,
      "class": "java.lang.StackTraceElement"
    },
    {
      "methodName": "run",
      "fileName": null,
      "className": "java.lang.Thread",
      "nativeMethod": false,
      "lineNumber": -1,
      "hCode": 1432591020,
      "class": "java.lang.StackTraceElement"
    }
  ],
  "suppressed": [],
  "additionalInformation": "
Driver info: org.openqa.selenium.edge.EdgeDriver
Capabilities [{acceptSslCerts=true, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}]
Session ID: 4F79B8A4-7298-4A58-8536-806C092E1AFD",
  "localizedMessage": "Element not displayed (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.58.243', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.edge.EdgeDriver
Capabilities [{acceptSslCerts=true, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}]
Session ID: 4F79B8A4-7298-4A58-8536-806C092E1AFD",
  "class": "org.openqa.selenium.ElementNotVisibleException",
  "buildInformation": {
    "buildRevision": "4c2593c",
    "releaseLabel": "2.52.0",
    "hCode": 14075978,
    "buildTime": "2016-02-11 19:06:42",
    "class": "org.openqa.selenium.internal.BuildInfo"
  },
  "message": "Element not displayed (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 6 milliseconds
Build info: version: '2.52.0', revision: '4c2593c', time: '2016-02-11 19:06:42'
System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.58.243', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.edge.EdgeDriver
Capabilities [{acceptSslCerts=true, browserVersion=25.10586.0.0, platformVersion=10, browserName=MicrosoftEdge, takesScreenshot=true, pageLoadStrategy=normal, takesElementScreenshot=true, platformName=windows, platform=ANY}]
Session ID: 4F79B8A4-7298-4A58-8536-806C092E1AFD",
  "systemInformation": "System info: host: 'WIN-SB3ER6JQ6ME', ip: '172.20.58.243', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'",
  "cause": null,
  "supportUrl": null
}

Clicking is not the only failure; I get problems with moveTo as well.

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Brad E.”

      Changed Title from “WebDriver reports element as not displayed” to “reports element as not displayed”

    • The current public stable for Win 10 / Edge is Microsoft Edge 38.14393.0.0 - can you update to this version and let us know if the problem still exists?

    • I have similar symptoms using Edge 38.14393.0.0. I’m not sure if the div nesting is the root cause, but I do certainly have a page elements (including a clickable div) for which EdgeDriver reports Displayed=false even though they are visible in the browser; and trying to click on them with the Click() method throws InvalidOperationException: "element is obscured".

    • No, I cannot, myself. We are a mac shop, and our only access to the Edge browser for automated / Selenium based testing is SauceLabs. They have not upgraded to 38 yet.

    • Microsoft Edge Team

      Changed Assigned To to “Mara P.”

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

      Changed Status to “Confirmed”

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

    Sign in