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
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: 4947
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