hi i am trying to automate one form in selenium using java code.

the same codee working fine in firefox but getting error in IE.

Started InternetExplorerDriver server (32-bit)
Listening on port 10840
Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with name == ImpersonateUserId (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 326 milliseconds
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: '2.42.2', revision: '6a6995d', time: '2014-06-03 17:42:30'
System info: host: 'din07006108', ip: '', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.6.0_24'
Session ID: 99b0ed53-5bfb-4e77-8d0c-451c9625518a
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, elementScrollBehavior=0, enablePersistentHover=true, ignoreZoomSetting=false, ie.ensureCleanSession=false, browserName=internet explorer, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss, version=8, ie.usePerProcessProxy=false, cssSelectorsEnabled=true, ignoreProtectedModeSettings=false, requireWindowFocus=false, handlesAlerts=true, initialBrowserUrl=http://localhost:10840/, ie.forceCreateProcessApi=false, nativeEvents=true, browserAttachTimeout=0, ie.browserCommandLineSwitches=, takesScreenshot=true}]
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
       at java.lang.reflect.Constructor.newInstance(Unknown Source)
       at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:204)
       at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:156)
       at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:599)
       at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:352)
       at org.openqa.selenium.remote.RemoteWebDriver.findElementByName(RemoteWebDriver.java:425)
       at org.openqa.selenium.By$ByName.findElement(By.java:299)
       at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:344)
       at Login.main(Login.java:37)
3 Years
Discussion Span
Last Post by JamesCherrill

From a rough search, people said you may need to try implicite wait because the page may have not loaded yet... (source) Also if it involves security, you could deal with the setting using info from this thread from another site.

Edited by Taywin


Hi vishalcap
For the benefit of anyone else getting this problem in future, and finding this thread, can you please let us know what the problem was, and how you fixed it?

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.