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)
2.42.0.0
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: '10.48.78.6', 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)

Recommended Answers

All 4 Replies

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.

Thanks Taywin,

have already tried this all still no luck.

Issue Solved

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?
thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.