Start testing GUI with RoutineBot in just few minutes

This is a short step by step guide on how to start using RoutineBot for GUI testing purposes. We will show how to run the program that you want to test, how to perform simple actions with it and how to check if results are what you except them to be. Finally, we will log necessary information into the text file.

  • Starting version 3.0 RoutineBot supports automated scripts recording, so it simplifies the creation of first script, recording user’s activity basing on snap-shots or mouse movement. Learn more about recording of scripts.

If you have a question, you can check our FAQ section. There are some common questions listed.

Step 1. Run RoutineBot

RoutineBot Icon
First run RoutineBot. You will see then two tabs “Select sample” and “Script”. Right now we need to go to the “Script” tab.

Step 2. Run the program you want to test

You will see then two tags "Select sample" and "Script". First run RoutineBot. You will see then two tags “Select sample” and “Script”. Right now we need to go to the “Script” tag.
Click "Add action button" Click “Add action button”.
Select "Execute" action in the "Action" drop list. Select “Execute” action in the “Action” drop list.
Enter the full path to Windows Calculator. Enter the full path to Windows Calculator.
Press "OK" button to add the action into your script. Press “OK” button to add the action into your script.

In the script editor it will be: Execute(‘C:\Windows\System32\calc.exe’);

Step 3. Taking pictures and making script

Click "Run script" button. The program will execute the script. Click “Run script” button. The program will execute the script.

The only command we now have in the scrip is executing WinCalc, so it will do this.

Go to "Select sample" tag and click "Make snapshot" button. Go to “Select sample” tag and click “Make snapshot” button.
You will have 5 seconds to switch to WinCalc and move the mouse across the Calculator window. You will have 5 seconds to switch to WinCalc and move the mouse across the Calculator window.

You can re-try if necessary by clicking “Make snapshot” button again.

It is now time to crop the image. It is now time to crop the image. Move mouse to the image and select the region that you need. For this example, I will use the image with “2” button.
Click "Save sample" to save the sample image into the library of the project. Click “Save sample” to save the sample image into the library of the project.
Enter some meaningful name of the image to save and some comment if you need it. Click OK button. Enter some meaningful name of the image to save and some comment if you need it. Click OK button.
Then, it is time to assign some action to the created image. Then, it is time to assign some action to the created image. Click “Select action” button.
Select "MouseFocuse" action from the list (actually, by default it will already be selected). Select “MouseFocuse” action from the list (actually, by default it will already be selected).
Select image sample to act on. Select image sample to act on. By default it will be the last taken screen. So most likely, you will not need to change anything.
Click "OK" button. Click “OK” button.

Step 4. Adding some testing functionality

Again, click "Add action button" Again, click “Add action button”.
Select in the action drop list the "MouseClick" button. Select in the action drop list the “MouseClick” button.
Now click "Run script" button to see what the RoutineBot will do. Now click “Run script” button to see what the RoutineBot will do. It should run the WinCalc.exe, then move mouse to the “2” button and then click on it.
Now go to the "Select sample" tag, click "Make snapshot" button and do a snapshot of results window in WinCalc. Now go to the “Select sample” tag, click “Make snapshot” button and do a snapshot of results window in WinCalc.
Then crop it as shown on the screenshot. Then crop it as shown on the screenshot.
Click "Save sample" button and save the image under "2_res" name. Click “Save sample” button and save the image under “2_res” name.
Click "Select action" button. Click “Select action” button.
Select "MouseFocuse" action Select “MouseFocuse” action.
Click OK. Click OK.
Here is the script text. We will modify it a little to save results to log file Here is the script text. We will modify it a little to save results to log file.

Step 5. Modified script

Here is how modified script looks like.
We have added:

  • Res:= …. , if the program will find the image 2_res.bmp, then it will return 1, if not it will return 0
  • If res is 1 then we will write OK text to the text.txt file
  • If res is 0 then we will write “Failed” to the text.txt file

Other samples

Posted in Samples
Tags: , ,

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: