Archive

Archive for the ‘Articles’ Category

Computer vision helps to test interface objects that changed

August 24th, 2010

RoutineBot version 3.3 includes a new function – MouseFocuseCV, this function uses OpenCV library to provide user with more intellectual comparison of script’s image patterns to objects on the screen.

RoutineBot uses image patters to execute the test script. As developers add more features into the application the interface might change a little, for instance:

  • The size of button can be changed;
  • The text one the button can be changed a little;
  • The color might be changed;

If compare pattern images with on screen images pixel-by-pixel (using old MouseFocuse function), the script will fail.

With MouseFocuseCV there are much more chances for the script to be executed successfully.

  • Share/Bookmark

admin Articles

Using functions from other projects

May 10th, 2010

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.

  • Share/Bookmark

admin Articles

Browse and click menu commands of tested application

July 11th, 2009

Starting version 1.6 RoutineBot can click on certain menu commands in tested application. The process is now automated to make it easy to find necessary menu name, address to it and click it.

The step-by-step it looks like:

  1. Run RoutineBot and go to the Tools > Menu Browser. As as result you will have a list of all menus avaliable in the system right now sorted by application.

    The menu browser in RoutineBot - select menu item and click it automatically

    The menu browser in RoutineBot - select menu item and click it automatically

  2. Find the menu you need and click OK.
  3. In your script will be added the code like this:

ExecuteMenuItem(‘notepad.exe’,'New’);

This code will click on “New” menu in running notepad.exe.

Known limitations:

  • The function will ExecuteMenuItem will work only with default system menues, if application use some custom designed menu, it will not work;
  • The ExecuteMenuItem command addresses the menu by menu name and application name, so if there are more than two applications with the same .exe name are running, then RoutineBot will execute action for the first application only
  • Share/Bookmark

admin Articles