selenium-google-code-issue-archive
selenium-google-code-issue-archive copied to clipboard
InternetExplorerDriver NoSuchWindowException when saving passwords turned off in IE11
Originally reported on Google Code with ID 7848
Hi,
I can't get past a login form in my test (non-HTTPS) environments due to false-positive
NoSuchWindowException exception a second after POSTing in IE11.
The workaround seems to be to either reenable password prompts or to add the form page
to 'Trusted sites', i.e. to either pollute the screenshots or the security settings.
1. Uncheck Internet Options > Content > AutoComplete Settings > Usernames and passwords
on forms > Ask me before saving passwords (or run test twice and click 'Not for this
site')
2. Use a non-https non-hostname (or use FQDN or IP) login form with a password input
and post method, e.g. http://fiddle.jshell.net/Lsdwebbu/show/light/
Windows 8.1 and Windows Server 2012 R2
Internet Explorer 11.0.9600.17***
Selenium.WebDriver.2.42.0
IEDriverServer_Win32_2.42.0
http://jsfiddle.net/Lsdwebbu/
http://fiddle.jshell.net/Lsdwebbu/show/light/
<form method="post" action="http://kozhevnikov.com/login">
<input type="text" id="username" name="username" />
<input type="password" id="password" name="password" />
<input type="submit" id="login" />
</form>
[Test]
public void Foo()
{
var driver = new InternetExplorerDriver();
driver.Navigate().GoToUrl("http://fiddle.jshell.net/Lsdwebbu/show/light/");
driver.FindElement(By.Id("username")).SendKeys("foo");
driver.FindElement(By.Id("password")).SendKeys("bar");
driver.FindElement(By.Id("login")).Click();
Thread.Sleep(3000);
Assert.That(driver.CurrentWindowHandle, Is.Not.Empty);
Assert.That(driver.WindowHandles, Has.Count.Positive);
}
OpenQA.Selenium.NoSuchWindowException : Window is closed
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
at OpenQA.Selenium.Remote.RemoteWebDriver.get_CurrentWindowHandle()
T 2014-09-05 16:57:07:432 server.cc(62) Entering Server::OnHttpEvent
T 2014-09-05 16:57:07:432 server.cc(128) Entering Server::ProcessRequest
T 2014-09-05 16:57:07:432 server.cc(137) Process request with: URI: /session/87a1d00d-1e55-4831-a6f3-ab407d9cae5a/window_handle
HTTP verb: GET
body: {}
T 2014-09-05 16:57:07:432 server.cc(230) Entering Server::DispatchCommand
T 2014-09-05 16:57:07:432 server.cc(530) Entering Server::LookupCommand
D 2014-09-05 16:57:07:432 server.cc(239) Command: GET /session/87a1d00d-1e55-4831-a6f3-ab407d9cae5a/window_handle
{}
T 2014-09-05 16:57:07:432 server.cc(346) Entering Server::LookupSession
T 2014-09-05 16:57:07:432 IESession.cpp(187) Entering IESession::ExecuteCommand
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(151) Entering IECommandExecutor::OnSetCommand
T 2014-09-05 16:57:07:433 command.cc(27) Entering Command::Populate
D 2014-09-05 16:57:07:433 command.cc(33) Raw JSON command: { "command" : "getCurrentWindowHandle",
"locator" : { "sessionid" : "87a1d00d-1e55-4831-a6f3-ab407d9cae5a" }, "parameters"
: {} }
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(162) Entering IECommandExecutor::OnExecCommand
T 2014-09-05 16:57:07:433 IESession.cpp(208) Beginning wait for response length to
be not zero
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(458) Entering IECommandExecutor::DispatchCommand
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(574) Entering IECommandExecutor::GetCurrentBrowser
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(580) Entering IECommandExecutor::GetManagedBrowser
W 2014-09-05 16:57:07:433 IECommandExecutor.cpp(588) Browser ID requested was an empty
string
W 2014-09-05 16:57:07:433 IECommandExecutor.cpp(504) Unable to find current browser
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(580) Entering IECommandExecutor::GetManagedBrowser
W 2014-09-05 16:57:07:433 IECommandExecutor.cpp(588) Browser ID requested was an empty
string
T 2014-09-05 16:57:07:433 response.cc(68) Entering Response::SetErrorResponse
W 2014-09-05 16:57:07:433 response.cc(69) Error response has status code 23 and message
'Window is closed' message
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(574) Entering IECommandExecutor::GetCurrentBrowser
T 2014-09-05 16:57:07:433 IECommandExecutor.cpp(580) Entering IECommandExecutor::GetManagedBrowser
W 2014-09-05 16:57:07:433 IECommandExecutor.cpp(588) Browser ID requested was an empty
string
W 2014-09-05 16:57:07:433 IECommandExecutor.cpp(521) Unable to get current browser
T 2014-09-05 16:57:07:433 response.cc(43) Entering Response::Serialize
T 2014-09-05 16:57:07:444 IESession.cpp(217) Found non-zero response length
T 2014-09-05 16:57:07:444 IECommandExecutor.cpp(185) Entering IECommandExecutor::OnGetResponse
T 2014-09-05 16:57:07:444 IECommandExecutor.cpp(295) Entering IECommandExecutor::OnIsSessionValid
D 2014-09-05 16:57:07:445 server.cc(308) Response: {"sessionId":"87a1d00d-1e55-4831-a6f3-ab407d9cae5a","status":23,"value":{"message":"Window
is closed"}}
T 2014-09-05 16:57:07:445 server.cc(359) Entering Server::SendResponseToClient
T 2014-09-05 16:57:07:445 response.cc(32) Entering Response::Deserialize
T 2014-09-05 16:57:07:445 server.cc(451) Entering Server::SendHttpInternalError
Regards,
Ilya Kozhevnikov.
Reported by ilya kozhevnikov
on 2014-09-05 16:19:30
Reported by barancev
on 2014-09-08 05:04:09
- Labels added: Browser-IE
Reported by luke.semerau
on 2015-09-17 17:47:05
- Labels added: Restrict-AddIssueComment-Commit