Handling web browser crashes

Information related to the use of iMacros for uptime monitoring, performance and regression testing of websites.

Moderator: iMacros Moderators

Handling web browser crashes

by Tech Support on Mon Aug 21, 2006 7:53 am

Sometimes a website can crash a web browser. This can happen to Firefox, Internet Explorer and (unfortunately) even the iMacros web browser. Often, such a crash is caused not by the browser itself but by a third-party plugin such as Flash or Java. From a web automation point of view, the crash itself is often not a big problem if the controlling program/script itself continues to run and reports the crash just like any other error. This is no problem when with the iMacros software:

Run time error example:

The Scripting Interface will catch all kind of runtime errors ("crashes") of the iMacros Browser or of Internet Explorer with iMacros plugin. It reports the crash back to the controlling program/script as negative error return code between -1 and -100. All the scripts needs to do is to call iimExit (to make sure the browser instance is really closed and not just frozen) and start a new instance with iimInit.

In VBS that looks like:
Code: Select all
    iret = iim1.iimPlay("MyMacro", 90)
    if iret < 0 and iret > - 100 then
       iret = iim1.iimExit ()
       iret = iim1.iimInit ("", TRUE)
    end if

In this example we used 90 seconds as timeout value. If the Scripting Interface gets no reaction from the browser after 90 seconds it returns from the iimPlay command.

Note: Not all error values between -1 and -100 are used, but this is the range that is reserverd for Interface related return codes. All error codes below -100 are macro related. All detailed list of error codes is available at http://www.iopus.com/imacros/help/scrip ... r_code.htm
User avatar
Tech Support
Posts: 5003
Joined: Tue Sep 20, 2005 12:25 pm

Re: Handling web browser crashes

by LAPIII on Thu May 28, 2009 8:07 am

This isn't a guarentee that a browser won't crash, is it? Which browser is least likely to crash, FF, IE, or iMacro? Even though the iMacros browser uses the IE engine, then iMacros isn't necessarily equally safe.
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

Re: Handling web browser crashes

by LAPIII on Thu May 28, 2009 8:38 am

I want to keep a macro on 24/7.
Posts: 254
Joined: Tue Oct 07, 2008 12:24 pm

Re: Handling web browser crashes

by Marcia, Tech Support on Thu Jun 18, 2009 1:44 pm


The wiki's section on Web Testing might be of interest for you, then.

Marcia, Tech Support
Posts: 1060
Joined: Thu Jan 29, 2009 6:10 am

Return to How-To's and Examples for Web Testing

Who is online

Users browsing this forum: No registered users and 1 guest