16 Replies Last post: Jul 13, 2009 10:38 PM by tarun parmar   1 2 Previous Next
Csongor Gyuricza Beginner 21 posts since
May 20, 2008
Currently Being Moderated

Nov 19, 2008 2:03 PM

How to handle IE crashes?

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.

Andras Hatvani Almighty 567 posts since
Oct 16, 2006
Currently Being Moderated
1. Dec 2, 2008 7:01 PM in response to: Csongor Gyuricza
Re: How to handle IE crashes?

Hi,

 

which Windows platform and which version of IE and SRC are you using? What were your findings after searching the forum?

 

Andras

Andras Hatvani Almighty 567 posts since
Oct 16, 2006
Currently Being Moderated
3. Dec 3, 2008 2:24 PM in response to: Csongor Gyuricza
Re: How to handle IE crashes?

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

pvtrao Pro 106 posts since
Oct 24, 2008
Currently Being Moderated
5. Dec 22, 2008 7:29 AM in response to: Csongor Gyuricza
Re: How to handle IE crashes?

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.

patrick Beginner 4 posts since
Feb 18, 2009
Currently Being Moderated
8. Mar 14, 2009 2:15 AM in response to: Csongor Gyuricza
Re: How to handle IE crashes?

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")

patrick Beginner 4 posts since
Feb 18, 2009
Currently Being Moderated
9. Mar 17, 2009 3:58 PM in response to: patrick
Re: How to handle IE crashes?

Also, disable Windows Reporting since it causes the tests to hang.

These instructions are for XP.

  • Go to System settings panel
  • Click the Advanced tab
  • Click the Error Reporting button
  • Disable error reporting and do not notify when critical errors occur. The tests will fail naturally because the browser will close.

 

http://www.theeldergeek.com/windows_xp_error_reporting.htm

Lisa Robinson Beginner 3 posts since
Nov 11, 2008
Currently Being Moderated
10. Mar 30, 2009 1:52 PM in response to: patrick
Re: How to handle IE crashes?

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

patrick Beginner 4 posts since
Feb 18, 2009
Currently Being Moderated
11. Mar 31, 2009 12:07 AM in response to: Lisa Robinson
Re: How to handle IE crashes?

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.

Lisa Robinson Beginner 3 posts since
Nov 11, 2008
Currently Being Moderated
12. Mar 31, 2009 11:10 AM in response to: patrick
Re: How to handle IE crashes?

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

patrick Beginner 4 posts since
Feb 18, 2009
Currently Being Moderated
13. Mar 31, 2009 11:58 AM in response to: Lisa Robinson
Re: How to handle IE crashes?

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.

Lisa Robinson Beginner 3 posts since
Nov 11, 2008
Currently Being Moderated
14. Mar 31, 2009 1:18 PM in response to: patrick
Re: How to handle IE crashes?

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.

More Like This

  • Retrieving data ...