I'm running tests in Ruby Mine 2.7.1 using Page-Object + Rspec.
Environment: Windows 7 x64, Ruby 1.9.3 p551, IE 11.
Gems: watir
, rspec
, bundler
, page-object
When i run tests in Chrome or Firefox everything is ok.
But when i try to run them in IE, the IE window with correct page gets opened and after that i get an error specified in Subject: "Watir::Exception::NoMatchingWindowFoundException: browser window was closed"
The point is that the browser is actually open at that moment and shows a correct page. (See the screencast showing what happens: http://screencast.com/t/06prRy3OMLM)
Test gets finished with an error and the config.after do
section doesn't get executed because the browser window remains opened.
That error happens when the following code is executed:
before(:each) do
visit <ClassName>
end
Seems like the IEDriverServer loses connection with IE right after the page is opened.
The most confusing this is that in very rare cases, everything is working good, and in even more rare cases everything is working with significant slowdowns with timeout error at the end.
sleep <n>
delays don't help.
I tried different versions of selenium-webdriver
gem (it is required by watir
gem), different versions of IEDriverServer
for both x86 and x64 platforms - result is the same.
Exception description in lib/watir-classic/exceptions.rb
says the following:
# This exception is raised if the window cannot be found
class NoMatchingWindowFoundException < WatirException; end
What do i do to set IEDriverServer not to lose the IE browser?