Selenium WebDriver can find element in Chrome but not in FireFox and IE-11

I wrote the following  code  to find elementin Java when on run on chrome , it identifies the control but when run from firefox and IE-11 , it did not find control.

I also try with name and xpath but result was same not found control.

Can somebody help me . what should i do ?

WebElement BtnSubmit = driver.findElement(“btnSubmit”));;

Default Asked on February 16, 2017 in Selenium WebDriver.

any Exception?

on February 16, 2017.

Below is the complete error:

Listening on port 3639
Only local connections are allowed
Feb 23, 2017 2:10:35 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
Exception in thread “main” org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 54 milliseconds
Build info: version: ‘unknown’, revision: ’86a5d70′, time: ‘2017-02-16 07:47:51 -0800’
System info: host: ‘FARRUKH-PC’, ip: ‘’, ‘Windows 7’, os.arch: ‘amd64’, os.version: ‘6.1’, java.version: ‘1.8.0_121′
Driver info:
Capabilities [{browserAttachTimeout=0, ie.enableFullPageScreenshot=true, enablePersistentHover=true, ie.forceCreateProcessApi=false, ie.forceShellWindowsApi=false, pageLoadStrategy=normal, ignoreZoomSetting=false, ie.fileUploadDialogTimeout=3000, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:3639/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]
Session ID: 0d886e55-d7a8-4753-92a7-36fdfff6e7c1
*** Element info: {Using=xpath, value=.//*[@id=’loginForm’]/div/div/div[3]/input}
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(
at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(
at org.openqa.selenium.remote.RemoteWebDriver.execute(
at org.openqa.selenium.remote.RemoteWebDriver.findElement(
at org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath(
at org.openqa.selenium.By$ByXPath.findElement(
at org.openqa.selenium.remote.RemoteWebDriver.findElement(
at CRM.Testcase.main(

on February 23, 2017.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.