You will find below the list of commands available in iTestBot with
description telling what the command do and how the command can help
you. To access these commands you should run iTestBot, select
there Script tab, and click "Add action" button.
| Command |
Description |
How can it help? |
| Execute |
Runs any external
application with parameters. |
Use this command to execute some
external programs. Pass the name of file you want to open as a
parameter. Sure, you can manage script to select "Start - Program -
Your program name", but using execute command is more
reliable way. |
| KillProcess |
Closes
application. |
This command closes application. Use
it to make your scripts more reliable, for instance, some
application, if not closed, might block the further execution of
your script. In this case KillProcess command will ensure that the
process was closed. |
| MouseFocuse |
Focuses mouse on
specific image. Parameters are Try Interval and
Time out
Note: when adding command you can specify left or
right mouse click. |
One of the most powerful command. It
searches for some picture on the screen, if found, the command will
focus your mouse pointer on the center of this image.
What if image will not be found? It depends on
your parameters - try interval and time out interval. It is good
idea to use some timeout and try intervals. As sometime it takes
computer time to execute your commands and show results on the
screen. |
| MouseClick,
MouseDoubleClick |
This command
emulates mouse click on the current cursor position.
Note: when adding command you can specify left or right mouse
click. |
Use this command after MouseFocuse
command to click on the objects you focused on. For instance. to
click the button or click the list on the web-site. |
| MouseUp and MouseDown |
Emulates the
MouseDown event and MouseUp event. Actually, MouseClick in Windows
is MouseDown + MouseUp.
Note: when adding command you can specify left or right mouse
click. |
Sometime there is need to press and
don't release mouse button. In this case these command will help. |
| MouseScrollUp and
MouseScrollDown |
These two command
emulates the mouse scrolling on the page. The parameter is the
number of steps to scroll. |
Sometime it is necessary to fill some
data on the top of the page, then scroll down and then click
"Submit" button. That is the way you can automate the scroll down
task. Sure, you can focus the mouse on the down arrow, but scrolling
in this way is more reliable. |
| MouseMove |
Moves the mouse to
the screen coordinates. |
This command moves the mouse to the
screen coordinates, where X=0 is the left and Y=0 is the top. |
| MouseMoveRel |
Moves mouse
relatively.
|
This is very useful command. Use it
with MouseFocuse command. First, you focus on some object on the
screen, for instance, it is label above the text box, then you move
a little your mouse down (so it will point on the text box), then
you click and enter necessary text. This command is very useful, as
sometime it is not possible to focus on the object by it's image
template, but there are a lot of other objects that helps to focus
on this object and then move mouse relatively. |
| ClickButton |
Click on the
button. Pass button's caption as a parameter. |
If you have a button on in your
application and it has some caption, then it is the best way to
click this button. Sure, you can focus on it with MouseFocuse and
then click on it, but ClickButton will work faster. |
| EnterKeys |
Pass to this
command any text sting that you want to enter. Actually, you can
click any key using this command.
Check more information about
supported
keys. |
The most useful keys:
- EnterKeys('^v'); - will emulate the Control +
V command, e.g. paste text or picture from the clipboard.
- EnterKeys('~') - will emulate "enter" key.
- EnterKeys('%{PRTSC}'); - emulates Alt +
PrintScreen key.
Check more information about
supported
keys. |
| Wait |
Script just waits
for a necessary time. Pass wait interval in milliseconds. |
Sometime it is a good idea to wait...
until application will run or web-page will be fully loaded.
Sometime iTestBot might click too fast so that some web-site might
not be fast enough to update data.
A better alternative to Wait is MouseFocus
command, think about MouseFocus command in this case as about "WaitForImage"
command. In will not just wait specified time, but will search for
some image to appear. If found, it will continue running script. |
| SetWarningsOn |
Specify whether
iTestBot should automatically process possible warning messages. |
Sometime there might be some
unexpected problem. For instance, one of your applications will
close with access violation message. iTestBot has an ability to
close these messages automatically. |
|
IncludeIniFile |
Use
this function to declare variables with some predefined values.
Useful when a lot of variable parameters need to be passed to
script. |
Here is example. We
have tmp.ini file in C:\tmp directory, the content of the file is
just one line "a=The test text from ini", in this way we declare the
variable a. Now, we will test it in script like this:
IncludeIniFile('C:\tmp\tmp.ini');
msgbox(a);
the result of script execution will be the message "The test text
from ini" |
| CopyToClipBoard |
The command is
useful, if you need to copy the value of some variable to the
clipboard.
The function is good to use together with GetFileContent
function when you need to insert some text into the text field on
the web-form. |
The are two ways to use this function:
- CopyToClipBoard(i); // the function will copy the value of
variable i to the clipboard
- CopyToClipBoard('test'); //the function will copy the text
string to the clipboard
This command will get the content of the file and copy it to the
clipboard:
- CopyToClipBoard(GetFileContent('C:\tmp\somefile.txt'));
|
|
GetFileContent |
The function
will return the text content of the file.
Use this function together with FileExists function. |
Examples:
- a:=GetFileContent('C:\tmp\somefile.txt'); // the a
now contains the content of the file
- CopyToClipBoard(GetFileContent('C:\tmp\somefile.txt')); //
will get the content of the file, it is possible now to use
clipboard value to paste values into the web-form or somewhere
else.
|
| FileExists |
The function will
return 1 if passed parameter is a valid name of file, which exists.
0 - if the file doesn't exist. |
Example:
if FileExists('C:\tmp\tmp.ini')=1
then begin
msgbox('Exists')
end
else msgbox('Does not exists'); |
| MouseX and
MouseY functions |
These two
functions will return integer value of the current mouse X and Y
coordinate |
Use functions to have an integer
values of coordinates. It is a function only, if you need to move
mouse to somewhere, you will need to use MouseMove or
MouseMoveRel functions. |
| LogMessage |
Pass the message
to log and the program will write it into its log |
Can use this function for some
internal debuging |
| WriteText |
The function will
write a certain text to certain file |
The function has three parameters:
- File name to write
- The text to write
- Append (1) or rewrite file (0)
Example:
- WriteText('C:\test.txt','text',1); // will append 'text'
string to the file C:\test.txt
|
| MsgBox |
The function will
show a standard window dialog with text or variable value |
Examples:
- MsgBox('Message Text');
- MsgBox(a); // will show the message with a variable
value
|
| ShowHint |
This function will
show specified text in a hint near products' icon in the tray. Use
it to inform yourself or quality engineer about the process stage
during testing or routine tasks automation. |
Examples:
- ShowHint('Test Message1','Info'); // will show test "Test
Message1" as a hint with title "Info".
|
| Show and
Hide
commands |
Show or Hide for
script executer program. |
When you just debug your script don't
use these commands, in this way you will see how script is
executing, what images it is looking in ImageFocus command. When
your script is ready use "Hide" command in the first list of the
script. |
| Help |
This command will
open the dialog with all script commands |
You might use this dialog for testing
purposes or for your information. |