Unable to find elements on IE 11, Windows Server 2012 R2
We are having some issues finding elements using WebdriverJS with IE 11 on Windows Server 2012 R2. The same code works fine on Windows 7/8/8.1, so I'm pretty sure that points to some sort of configuration issue on our side.
We've performed the IE configuration found here: https://code.google.com/p/selenium/wiki/InternetExplorerDriver
We're attempting:
driver.isElementPresent(By.tagName('body'));
And it results in:
NoSuchElementError: Finding elements with tag name == bodyreturned an unexpected error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 311 milliseconds For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html Build info: version: '2.45.0', revision: '5017cb8', time: '2015-02-26 23:59:50' System info: host: 'ip-0AC8460B', ip: '10.200.70.11', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_51' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=false, ie.forceCreateProcessApi=true, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=true, elementScrollBehavior=0, ie.browserCommandLineSwitches=-extoff -nohangrecovery, requireWindowFocus=true, browserName=internet explorer, initialBrowserUrl=http://localhost:29760/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] Session ID: d8981e6a-7c0a-4b50-806e-8493c1546f0e *** Element info: {Using=tag name, value=body}
Anyone have any suggestions on what configuration we can check? Are there any known issues with Selenium on Windows Server 2012 R2?
Any solution for this? Im getting the same issue.
Any updates on this? I am stuck with the same error. Any suggestions?
HI. My solution was not to run it on windows 2012 server and stick with win professional.
same error for me
I'm getting a different error but not finding any elements either after navigating to page:
Unable to find element on closed window (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 31 milliseconds Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16' System info: host: 'hostname', ip: '10.1.210.147', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_60' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:6618/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] Session ID: 992f43c9-a8ca-499d-b81a-0bfff1219621 *** Element info: {Using=tag name, value=body}
org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 31 milliseconds Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16' System info: host: 'hostname', ip: '10.1.210.147', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_60' Driver info: org.openqa.selenium.ie.InternetExplorerDriver Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:6618/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}] Session ID: 992f43c9-a8ca-499d-b81a-0bfff1219621 *** Element info: {Using=tag name, value=body} at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:595) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:348) at org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName(RemoteWebDriver.java:413) at org.openqa.selenium.By$ByTagName.findElement(By.java:331) at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:340)
Is there any way to figure out what goes wrong?
I found that if I added a sleep before navigating to test page and pressed F12 to open dev tools on it then following commands succeeded. Which after some googling revealed that I accidentally set up FEATURE_BFCACHE for 32bit system on a 64bit machine. Feeling silly now, but at least the test works :)
I have the same issue, as "swqajunkie" said, dont run it on windows server, I did shift everything from server to windows 7 machine but the error is still same. Today i updated the IEDriverServer as its changelog said it will fix the issue of not finding elements but instead it throws this exception:
Unable to cast object of type 'System.Collections.Generic.Dictionary`2[System.String,System.Object]' to type 'OpenQA.Selenium.Proxy'.
As the same code works with the previous versions so I'm assuming its the driver issue, but still the issue remains. Also I found an article saying that Selenium was not designed to work with RC Server, here
So we should move everything to windows 7/8? or wait for the fix? If upgrading to 2.52.2 fixed someone's issue then please let me know.
@sophiaatif Can you please post the line of code that produces that exception? I do not understand how the .NET bindings would be attempting to parse a JSON response as a Proxy object from a call to FindElement or FindElements.
Running my tests on R2 2012 only, and got the same error as @merike .. Solved it in a similar fashion by navigating back to the IDE and then to IE 11 again.
@daviande : I'd suggest to check the config again.
- Ignore zoom level - true
- Ignore protected mode settings - true
Closing as the issue went stale, but in addition wee never got any more information.