Record test automation scripts with RoutineBot

Starting version 3.0. RoutineBot allows to record test automation scripts. The new function helps to record user actions and then play them back.

Access script recording functionality of RoutineBot with Start/stop recording commend in Tools menu

Access script recording functionality of RoutineBot with Start/stop recording commend in Tools menu

How it works

  • To start or stop recording use “Start/stop recording command” in Tools menu or Control + F12 hot key.

RoutineBot can record scripts in two modes:

  1. Snapshot based recording – combined graphical and mouse position recording mode. In this mode RoutineBot will try to make snapshots of objects at mouse position, but it also will record the relative movement of the mouse, so if during playback the snapshot was not found, your script will continue to play using data about relative mouse movement.
  2. Cursor position based recording – in this mode RoutineBot will record script basing mouse movements and click, without using snapshots.
  • In both modes RoutineBot will record text you type with keyboard;

To choose necessary mode go to the “Environment options” command in Tools menu, then switch to “Macros recording” tag:

Script macros recording properties dialog

Script macros recording properties dialog

  • Snapshot width and height fields determine the size of snapshot rectangle, by default it is 32×32, but you might want to make it smaller, say 16×16, if the interface of your application has smaller features that you need to address during script recording;
  • Normally, when you move your mouse over some element, say button, it’s appearance might change, and in this case taken snapshot will be useless. That’s why RoutineBot use snapshots not exactly in the time of click, but few moments before, for instance, when the mouse pointer was 50 pixels from click point. To specify this value we use “Min mouse moving distance” property.

Examples of script

This is how the script looks like after the recording in Snapshot based mode:

If MouseFocuse(‘0001 110-219 Calculator calc.exe 10.49.16.057.bmp’) = 0 then
begin
MouseMove(110,219);
end; {10:49:16:057}
MouseClick; {10:49:16:121}

{ the general idea is that script is trying to find the snapshot on the script, if it was not found the its moving mouse to certain position and finally do click;}
If MouseFocuse(‘0002 215-253 Calculator calc.exe 10.49.16.727.bmp’) = 0 then
begin
MouseMoveRel(105,34);
end; {10:49:16:727}
MouseClick; {10:49:16:793}

{the same idea is here, but if the snapshot was not found, RoutineBot moves mouse relatively from the previous click point}

Cropping image

Once script was created it is a good idea to test the created script. As all snapshots was taken automatically, you might need to improve some of them:

  • Some snapshots need to be replaced with good one; To take new snapshots go to the “Select test image” tag;
  • Some snapshots need to be cropped;  To crop snapshots use “Show gallery” command in “Project” menu, select there snapshot you need and use “Crop” button.
Posted in Official
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.

Email: