org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window

42 views
Skip to first unread message

Arunkumar Duraisamy

unread,
Jun 11, 2018, 1:17:23 PM6/11/18
to Selenium Users
Hi Everyone,

i am getting the below exception when executing my script.

steps are :

Get URL.
Send user name an


My Script is:

driver.get("http://ivpc0020:70/iMarsQA/iMarsUI/default.aspx");    /*once this url passed below shown is the actual screen displayed ( Popup window ) */
driver.findElement(By.id("txtUserName")).sendKeys("AUS");       /* when executing this below exception were written */









The blow is the Exception that i am getting when executing the script.




org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)

Command duration or timeout: 30 milliseconds

Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 02:56:46'

System info: host: 'ICPU0023', ip: '10.1.193.237', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_121'

Driver info: org.openqa.selenium.ie.InternetExplorerDriver

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:15933/, javascriptEnabled=true, ignoreProtectedModeSettings=false, enableElementCacheCleanup=true, unexpectedAlertBehaviour=dismiss}]

Session ID: a36551c7-732a-4205-88d6-31be7cc18a8d

*** Element info: {Using=id, value=txtUserName}

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: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.findElementById(RemoteWebDriver.java:389)

at org.openqa.selenium.By$ById.findElement(By.java:215)

at org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:340)

at executionEngine.Login.main(Login.java:30)

Reply all
Reply to author
Forward
0 new messages