Sometimes when my test starts IE crashes with the message "Internet Explorer has encountered a problem and needs to close". I don't know the reason for the crash but it happens about 20% of the time. That's topic for a different discussion.
The main problem is that it crashes selenium rc freezes until someone manually dismisses the error message.This is highly inconvenient. Does anyone know how to automatically handle IE's crash message? I don't mind if the script fails but I don't want it to freeze and prevent other scripts from running.
Hi,
which Windows platform and which version of IE and SRC are you using? What were your findings after searching the forum?
Andras
I currently have 4 rc boxes connected to 1 hub. Everytime I run the tests I get something different, sometimes all tests fail, sometimes none of them. I only have issues with IE6/7/8, never had issues with FF2 or FF3.
I have different problems depending on the environment. This is an example of some errors I get (each stack trace is for a different error)
seleniumrc1:
- Windows XP PRO
- IE8
- 5 instances of Selenium RC
com.thoughtworks.selenium.SeleniumException: ERROR: Current window or frame is closed!
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:154)
at com.thoughtworks.selenium.DefaultSelenium.getText(DefaultSelenium.java:326)
at com.pufferfish.testing.services.FunctionalAnswersTest.answerQuestionExceptionsFlow(FunctionalAnswersTest.java:322)
com.thoughtworks.selenium.SeleniumException: ERROR: Selenium failure. Please report to the Selenium Users forum at http://forums.openqa.org, with error details from the log window. The error message is: The remote server machine does not exist or is unavailable
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:73)
at com.thoughtworks.selenium.HttpCommandProcessor.getString(HttpCommandProcessor.java:154)
at com.thoughtworks.selenium.DefaultSelenium.getText(DefaultSelenium.java:326)
at com.pufferfish.testing.services.FunctionalAnswersTest.askQuestionExceptionsFlow(FunctionalAnswersTest.java:136)
seleniumrc2:
- Windows XP Pro
- IE6
- 5 instanced of Selenium RC
50% of the time the browser crashes immediately after being opened by Selenium RC. It shows the popup "Internet Explorer has encountered a problem and needs to close. We are sorry for the inconvenience" [ Send Error Report ] [ Don't Send ] => I have to pick one of the buttons or Selenium RC won't continue. When I dismiss this popup the script obviously fails because there is no browser window.
Let me know if you need more info.
So we're talking about a beta (1 or 2?) of a browser, which surely can be unstable! Selenium is a web application testing framework, and it is not intended to workaround stability issues of IE!
This is definitely a failure of the browser and has nothing to do with Selenium. I only can suggest you to file a detailed bug description - to microsoft.
In case of IE 6 I never experienced even similar issues, so I would suggest you to set up a clean environment for test execution.
Until you don't provide a reproducible test case or test suite it won't be possible for us to support you in finding out what "hurts" IE...
Andras
Andras,
I am having all sorts of crashes running my tests on IE6, 7 or 8 you name it. All fail at certain point. Maybe the first few tests work just fine but eventually IE crashes. I thought that maybe the web application that I am testing was causing it so I ran sample tests agains Yahoo's homepage. I get the same crashes. I also noticed that sometimes it crashes before even executing the first selenium command open("/"). Let's focus on IE7 as it is the "current" version of IE.
More details:
I am running selenium rc that comes with selenium grid 1.0.3 (was having the exact same problems when running 1.0.2)
Browser version is: IE 7.0.5730.11
OS version: XP Pro SP3
After a few tests IE crashes showing the popup "Internet Explorer has encountered a problem and needs to close". Then I need to manually close it then only the tests continue.
What could possibly be causing this? When I run the tests against Firefox they never crash. Sometimes I get "Firefox is already running" but that should be discussing in a different thread.
Got any ideas?
Csongor
Hi,
Even I also faced the same issues for a long time with IE6 and IE7.Actually I am using Selenium Core. After a long study on it I came to know while executing selenium scripts in IE we have to take care of all the sync. issues with the browser. for me some times it will work for the script and some times it will crash for the same script.
After that I started to observe the sync time with the app like
1. how much time it is taking to load a page ? so that we need to increase the page wait time.
2. If the page contains multiple frames we need to select the frame before access the element. but in firefox it is not required all the times.
While executing in IE it is slower than firefox. so we need to increase the defaylt selenium wait time using setTimeout().
Just try with these things hopefully will help you.
Thanks,
Venkat.
Hi Venkat,
I increased the timeout but unfortunately I am still experiencing the same problems. I created a simple script that performs a search on Goole and asserts the presence of a link in the results page. I ran the script against IE6 on XPPRO and IE7 on XPPRO. In both cases it crashes about 50% of the time. Sometimes as soon as the first page opens, sometimes after the search is performed.
Note that if I run the same script directly to a Selenium RC server (not through grid) it works fine. Only when I run it using the grid it causes the browser to crash. I think this has something to do with the customized selenium rc server that the grid uses. Has anyone else experienced a similar issue?
Csongor
It seems like the RC distribution that comes with Grid 1.0.3 is not working correctly with IE6/7. Basically it causes the browser to crash. A workaround for this is to replace the RC jar in the Grid with another version of RC such as 1.00 beta 1 or 0.9.2
Thanks to Philippe Hanrigou for helping me identify what was causing the browser to crash. I just hope someone finds a fix for this. I will work on it if I find some time.
All my IE tests failed and often crashed the browser until I set the execution speed longer than the default of 0. For the nightly builds I set the speed to half a second, ie, selenium.setSpeed("500")
Also, disable Windows Reporting since it causes the tests to hang.
These instructions are for XP.
I am having similar problems. I have taken all the recommendations so far in this stream, but am left still with one problem (at least).
Even though I am calling close_current_browser_session in my teardown routine, the browser window does not close upon completion of the test on IE7.
I am using the Selenium-Ruby gem with Selenium Grid on XP. I've tried both *iexplore and *iehta and both have the same problem. How do I get it to close down the browser upon completion of the test case??
Thanks,
Lisa Robinson
Lisa,
I have had issues with IE keeping child windows open. If the parent selenium window links to a new browser window, the new window won't close automatically by the selenium server. For example, if the link uses a html target to open a new window selenium doesn't know its there, therefore it can't close it. Not sure if that is the issue.
Hey, that worked! I had to add the Close call prior to the Close_current_browser_session call in my teardown proc. Haven't gone back to make sure it doesn't break FF3 yet, but seems to have done the trick. Thanks!
-- Lisa
I would probably make the Close call after the Close_current_browser_session. Closing the browser should automatically kill the session. I can see wanting to kill the session and then the browser, but by closing the browser it seems redundant to close the session again. Maybe I'm just not fully understanding how the driver works in Ruby. Glad you made progress though.
That makes sense and I tried that first, but it didn't work for me. The window remained and i got an exception on the close call indicating that the browser session was already closed... It looks like a bug to me that close_current_browser_session is not getting rid of the browser window on IE7. I think calling close first is just getting around the error.
