There are few simple interface testing samples available in setup package. For details check \Samples\ directory of installation folder.
More script samples are available in the online help for RoutineBot sytax.
Please note: these tests contains some system-specific information such as fixed paths to script files and screen samples of WinCalc, which might also be different on your system. If you will install RoutineBot in the “C:\program files\RoutineBot\” folder and you are running WinXP then scripts most likely will be executed normally.
Test batch file
In the samples folder we have placed a batch file which allows to automate testing with many scripts. Here it is:
echo Test 1 – Multiply values
echo Test 1 result:
echo Test 2 – Summarize values
echo Test 2 result:
once quality assurance engineer run this file, the scripts will be executed one by one, here is what should be outputted:
Calc Button Click Test
This test will run Windows calculator and click there some buttons to multiply two numbers. Then it will check if result is what was expected and will close with “passed” message. Check the list commands supported in RoutineBot.
- You can check the content of the script by unzipping calc-button-click.zip file.
The script text is:
- The script runs run cacl.exe
- The script searches for the image of “2” button and clicks this button
- The script searches for the image of “*” button and clicks this button
- The script searches for the image of “5” button and clicks this button.
- The script searches for the image of “=” button and clicks this button.
- The script searches for the resulted image, if found – execution successful if not found then execution failed.
- The script kills the calc.exe process.
To execute this script you should pass its name as a parameter to the Interpreter.exe. RoutineBot can generate the batch file with necessary parameters automatically, here is how the calc-button-click.bat looks like:
The most important are script name “calc-button-click.zip” and the -messagefile (which is res1.txt for this script) values.