Using functions from other projects

Latest version of RoutineBot allows to use functions from other external projects. The key idea is that you will be able to use not only functions, but also graphics.

Application: For instance, you can create a project that supposed to check the current state of your software and if it is not what you expected, change it accordingly.

How it works – option 1:

1. Run RoutineBot

2. Open your project

3. Make sure you have properly declared project and uses part (normally, if you created the project using our default templates everything should be fine)

4. Select Add project as unit in Project menu

5. Make sure the linked project appeared in Uses part as: Uses ‘test1.rbp’; (if you work with Pascal scripting);

How it works – option 2:

1. I have created test1.rbp, with source code:

Program My1Prg;
function TestFunc : Integer;
begin
x:=MouseFocuse(‘Sample.bmp’,1000);
ShowHint(‘ok’);
Result := x;
end;
begin

end.

Now I’d like to use test1.rbp in another project.

2. I create a new project, go to the “Explorer” tag and click “Attach file to project” button:

Click "Attach file to the project" button

Click "Attach file to the project" button

3. Now “Test1.rbp” appears in Explorer list:

Now test1.rbp is in our Explorer list

Now test1.rbp is in our Explorer list

4. Go to the “Source” tag and make sure the source code looks like this:

Program My1Prg;
Uses ‘test1.rbp’; // make sure the is just the name of the project, not full path
begin
TestFunc;
end.

5. Another important note, the initializing code in test1.rbp will also be executed, so keep it empty if you don’t need to execute anything.

Posted in Articles
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: