SetWarningsOn function in RoutineBot

Function SetWarningsOn enables or disables Exceptions searching. If these function is enabled, then after each event or function Interpreter will be search an error window, and if this window is found then to it sends event, that emulates click on ‘OK’ botton.

Interpreter finds 2 kinds of error symptoms

1)  Window that caption contains string ‘Access violation’


2) Window, that contains error icon.

E.g. in Windows XP it look so   error xp

and In Vindows Vista it look so  errorvista


SetWarningsOn( WarningsON:String )



If  WarningsON is 1 or ‘ON’ then function enables exceptions searching, otherwise if WarningsON is 0 or ‘OFF’ then function disables exceptions searching.


For this example you must download error sample application, that raises an exception.
ClickButton('Run divide error');
//error, cathed
ClickButton('Run divide error');
//error, not cathed

Download example SetWarningsOn

Posted in Articles
Tags: ,

Leave a Reply

Your email address will not be published. Required fields are marked *


Example: GUI test with RoutineBot

RoutineBot is testing GUI, trying to enter various values into the text fields and processing warning messages that tested program shows.

Gui Test Automation

GUI Testing TipsCheck out our GUI Test Automation tips.
Test Automation Step-by-Step
Learn more than 99% users know about test automation! Subscribe to maillist now! Learn how to create scripts that will do routine job for you.