Capturing Script errors with iMacros

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
bearaman
Posts: 65
Joined: Fri Mar 02, 2007 5:26 pm

Capturing Script errors with iMacros

Post by bearaman » Mon Jul 21, 2008 2:25 pm

Hi There,
I'm wondering if there's a way for iMacros to detect a script error on a web page and take a screenshot of the problem? For example, if I'm running some web testing and the page loaded generates a script error, I'd like that the error is recorded and maybe a screenshot taken for further investigation.
Can iMacros do this?
Thanks,
B.
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Capturing Script errors with iMacros

Post by Tech Support » Tue Jul 22, 2008 8:53 pm

Yes, you can run a regression test and ensure no errors came out of Javascript. Please see this FAQ for details:
http://wiki.imacros.net/Web_Testing#Q:_ ... _thrown.3F

To create a screenshot, you can call the macro from within a script and call a second macro (consisting of only one line!) to take the screenshot.

Example:

Code: Select all

i = iim1.iimPlay ("test macro")
if i < 0 then iimPlay ("CODE:SAVEAS TYPE=BMP FOLDER=* FILE=Time_{{!NOW:yyyymmdd_hhnnss}}.bmp")
bearaman
Posts: 65
Joined: Fri Mar 02, 2007 5:26 pm

Re: Capturing Script errors with iMacros

Post by bearaman » Wed Jul 23, 2008 4:10 pm

Great, exactly what I needed. Thanks!
Post Reply