Professional Documents
Culture Documents
Training Manual Visual Project Editor
Training Manual Visual Project Editor
Training Manual Visual Project Editor
Training Manual
Visual Project Editor
Version: R8.5
1.2 What are the epiplex500 modules involved in process automation? ............................................. 6
i
Epiplex500® 8.5 Training Manual – Visual Process Editor
Prerequisites
You need to have knowledge of the process capture and its implementation.
Audience
This course is designed for users such as developers, consultants, analysts who are keen to automate a
business process.
Course Structure
• Unit1 Comprises the lessons on how to create an automation project, how to insert various
objects, how to customize an automation project by editing scripts and inserting triggers etc. and
much more.
• Unit2 Comprises the summary of the course and assessments to assist you in improving your
knowledge about the using Visual Project Editor to create an automation project.
1 Unit 1 Lesson 1
The unit describes about the structure of automation process and basic UI elements in Visual Project
Editor (VPE).
• What are the common file types associated with process automation?
First you need to record a business procedure using epiplex500 capture module. The steps in the
process are stored as a *.gps file in your epiplex500 repository. Next, you open Visual Process Editor
from epiplex500 Home and create a blank automation project (*.epp file). You add a Robo Script
object to your automation project. This object enables you to browse and select the source capture file
(*.gps file) containing the process you want to automate. Finally, you save the automation project.
Your process has been automated. You can launch Genie Player and play the automation project.
An object is an entity in an automation project. Each object accomplishes a specific task. For example,
Start object marks beginning of an automation object, Timer object is used for introducing a delay in
the automation playback etc. You link one object with another with a connector. Thus connectors
decide the flow of objects, means in which order all objects are to be executed.
However, rather than simply record and playback a process, you might need to customize it according
to your requirement. Consider a scenario that you have automated a process which involves opening a
file in an application. The File Open dialog box is opened at the beginning of the automation playback.
User is required to type in a file name in the File Name text box. Since, name of the file is to be opened
might be at random for each automation playback; hence it is to be externalized. You can use a form
containing externalized fields used for each automation playback. In the present case, the form is to
contain a text box where user can type in a file name to be carried forward to automation playback. If
you initiate automation playback, a form is displayed containing a text box. This form is not the File
Open dialog of the target application. Rather, it is native to epiplex500 process automation. It is used
to accept various inputs for the externalized controls used during the automation playback. You type in
the file name to be opened by automation playback in the same text box. This text box is mapped to
the File Name text box in the File Open dialog. Whatever file name you type in the text box in form is
stored temporarily and during automation playback the same text is entered in the File Name text box.
For example, you need to open the file “Requirements.txt” file in the first run of a series of automation
playbacks. Again, you need to open “Sales.txt” file in during the second time playing the same
automation project. Hence, after initiating playback of the automation project for the first time, a form
containing a text box is displayed. You enter “Requirements.txt”. Later, during playback of the same
automation project for the second time, the same form is displayed once again. You enter this time
“Sales.txt”. Thus, you externalized and changed the target file name dynamically during playback.
Visual Project Editor: Enables you to design an automation project. You can define your source
process (*.gps) and import steps. You can also customize it by even adding your own script. This
editor enables you to view and design the project both pictorially and code wise.
Snippet Container: Contains built-in code samples for your ready reference.
Form Builder: Enables you to design forms consists of various controls. This form is displayed
during automation playback. Controls are used for accepting values from end user dynamically.
Image Cropper: Enables you to select a control from a step in a *.gps file.
To Do
There are two views available in the VPE: Design and Code. The Design view displays the pictorial intend
and flow of an automation project with various objects in it and how these objects are connected with
connectors. The Code view displays the script for the automation project.
These views can be selected at the bottom right corner of the screen. The dark shade indicates the
The Design view is consists of panes: Workflow Design and Design Area. The Workflow Design pane
displays list of objects available for creating an automation project.
The Design Area pane is the scratch pad for you to create a workflow. The illustration of objects and
connectors is referred to as automation project design diagram. The Design Area pane consists of its
own toolbar. You should not confuse this toolbar with the main VPE toolbar. The icons in the Design
Area toolbar facilitate you to handle objects in the Design Area pane. You may see a small box
appearing inside Design Area pane. This is called Thumb View. You can see a small preview of the
complete workflow. This is helpful particularly if the workflow consists of huge number of objects and
scattered all around the Design Area and you need to scroll through it all the time.
You drag an object from Workflow Design pane and drop it in Design Area pane. Then you connect two
objects using a connector. If you point your mouse to an object, you see a few dark circles adjoining the
current object. These objects are called connection points. A connection point serves as the link
between two objects. When you point your mouse to a connection point of an object, the mouse
pointer turns to cross hair. You drag from the connection point of the first object and drop it to the
connection point of the target object. A connector is drawn between two objects, indicating that now a
link has been established. Detailed description on objects, connectors and connection points has been
discussed at next lesson.
Icons available in the Design Area toolbar and their functionalities are:
To Click Icon
Zoom in
Zoom out
selected object
The Code view consists of two panes: Project, and Code Area. The Project pane displays the folder
structure of the selected automation project. You can see a tree view with nodes displayed as folders
and files. An expand icon or a collapse icon is displayed next to a folder, if the folder is not
empty. You click expand icon to expand the folder and view the files inside it. If a folder is already
expanded, you can click the collapse icon to hide all the files inside the selected folder.
Scripts: Lists all the *.eon files and other scripts associated with the current project.
Triggers: Lists all the triggers associated with the current project. You will learn triggers more in
later lessons.
You double click a file in the Project pane to display it in the Code Area pane. You can edit scripts in the
code area. However, you cannot edit an automation project file. The same is available only for viewing
purpose.
Icons available in the Code Area toolbar and their functionalities are:
To Click Icon
2 Unit 1 Lesson 2
In this lesson you will learn about creating new projects, inserting various objects in projects, editing
scripts and so on.
1. Click New icon in the toolbar. Create New Project dialog box is displayed.
You can open an existing automation project in Visual Project Editor. Steps to open an existing project
are:
1. Click Open icon in the toolbar. Open Automation Project dialog box is displayed.
2. Select appropriate automation project and click Open. Selected automation project is opened in
VPE.
You can save an individual file as well as all the files in a project. Steps to save an individual file in the
current project are:
1. Open the appropriate file. For example, you have edited a script in Code view and want to save
the same. You select the tab to display the same script file.
2. Click Save .
3. Click Save. Current project is saved with the specified new name.
Drawing an object
insert one.
Let’s create a basic automation project first to understand the basics of process automation. The first
project won’t be associated with any captured process, which will be done in second project. This first
one is simply a hello world type. A message box containing buttons Abort, Retry, and Ignore are
displayed. You click a button to proceed. Another message box is displayed depicting which button you
clicked.
1. Open VPE.
4. Click Create. New project is created and the same is displayed in Design mode. Start and End
objects are inserted by default and connected through a connector.
5. Drag Message Box object from Workflow Design pane and point to the connector connecting
Start and End objects. Connector color changes to dark blue. Release the Message Box object. It
is inserted in between Start and End objects.
6. Click the Message Box object. The Properties dialog is displayed. If not then click the Properties
icon in the Design Area toolbar to turn on Properties dialog display and click the newly
inserted Message Box object in the Design Area.
8. Drag End object towards down to accommodate more objects. Connectors are adjusted
automatically. You can see a temporary vertical line is displays for adjusting alignments.
9. Insert a Global Variable object in between End and Message Box objects.
Whenever you declare a global variable using a Global Variable object, the code for
declaration of the same is placed at the top of the auto generated code. This occurs
irrespective of the sequence and position of the inserted Global Variable object in the
automation project design diagram.
10. Click the Global Variable object to select it. The Global Variable Properties dialog box is
displayed.
b. Type in 'Hello' in the Value text box. Do not forget to enclose the value in single quotes,
if you type a non-numeric value.
d. Click the Variable list to expand it. The MyGlobalVar variable is displayed.
12. Insert a Switch Case object just before the End object. Unlike inserting other objects, where both
the preceding and succeeding connections to the previous and next objects are restored, here
the connection to the succeeding End object is lost.
13. Click the newly inserted Switch Case object to select it. The Switch Case Properties dialog box is
displayed.
15. Select the left most (first) Case node in the Switch Case object. The Case Properties dialog box
for the selected Case node is displayed.
b. Type ‘Abort’ in the Value text box. Don’t forget to type single quotes around the value.
17. Select the middle (second) Case node in the Switch Case object. Properties dialog box for the
selected Case node is displayed.
b. Type ‘Retry’ in the Value text box. Don’t forget to type single quotes around the value.
19. Insert a Message Box object and select it. The Message Box Properties dialog for the same is
displayed.
21. Insert another Message Box object and select it. The Message Box Properties dialog box for the
same is displayed.
23. Insert another Message Box object and select it. The Message Box Properties dialog box for the
same is displayed.
25. Connect three appropriate Message Box objects with concern Case nodes of the Switch Case
object.
27. Connect each last two Message Box objects at the end with an End object.
It first displays a message box containing three buttons: Abort, Retry, and Ignore. You click a button.
The same is tracked and finally it displays which button you have clicked.
You can design a form and accept input from end user during automation playback. These values are
subsequently used in the same automation playback. A small example can elaborate this better.
First you open Notepad and record a process in a *.gps file as:
Now you are ready to create an automation project using the same capture file. Steps to implement a
form and proceed with creating an automation project are:
1. Create an automation project named MyForm.epp. A connected pair of a Start and an End
objects is displayed by default.
3. Click the Robo Script object to select it. The Robo Script Properties dialog box is displayed.
b. Click Import from GPS and browse and select the Find.gps file.
6. Click the PE Form object to select it. The PE Form Properties dialog box is displayed.
a. Click Create New. The Create New Form dialog box is displayed.
b. Type r2 and click Create. The Form Builder utility is displayed. Designer pane displays a
blank form without any control.
c. Drag Text from Tool Box and drop it in the Designer pane. While dropping a place
holder is displayed. You are required to drop inside the same. A text box control is
added.
d. Click the Map pane to map the control drawn in the form with its counterpart in the
concern automation file. Map pane displays all the automation scripts available for the
selected project. Currently we have associated only one automation script, i.e. Find
(imported from Find.gps file).
e. Click the plus sign beside Find in the Automation Script(s) pane. Available controls in
the same automation script are displayed.
Now, if you launch the same automation project in Genie Player then a form consisting of a text box is
displayed first. You enter a value in the text box and proceed. The same value is typed by Genie Player
in the corresponding mapped text box during automation playback.
A connection point is a junction between a connector and an object. An object contains one or more
connection points. If you point your mouse pointer to an object, all the connection points of the object
are displayed. You can view the connection points marked as grey circles. If you move the mouse out
of the object, then the connection points start fading out. Finally, if you move mouse pointer even
further away from an object, the connection points are not displayed.
Number of connection points in an object depends on type of the object. For example, an If Condition
object requires three connection points connecting it to:
Previous object
1. Point your mouse pointer to the source object. Connection points of the source objects are
displayed.
2. Point your mouse pointer to the appropriate connection point of the source object. Mouse
pointer changes to cross hair. This indicates you have selected your appropriate
connection point in the source object.
3. Drag selected connection point and point to the target object. Available connection points in
the target object are displayed little enlarged with a fade border.
All connectors are Blue in color. However, the connector following an If Condition object True path is
Green in color, and another connector following False path of an If Condition object is Red in color.
There is also a label for True path and False path connectors.
A Loop connector is yet another distinct type of connectors. It marks either beginning or end of a loop
for a Repeat object. A Repeat object has two connection points: one at the top and the other one at
the bottom. The top connection point is connected to the first object in the collection of objects to be
repeated. This Loop connector is called Start Loop connector. The bottom connection point is
connected to the last object in the collection of objects to be repeated. This Loop connector is called
End Loop connector. The block or collection of objects embraced in between the Loop connectors of a
Repeat object are executed multiple times depending upon the condition specified in the Repeat
object. Unlike the True and False connector in an If Condition object marked in different colors, the
Start Loop and End Loop connectors in a Repeat object are marked in the same pink color. However,
for both Start Loop and End Loop connectors have same label “LOOP”.
Loop connector
When you insert an object, it is placed according to the current position of your mouse pointer.
However, while inserting an object, if you point your mouse pointer along with the new object to the
connector in between two connected objects, then the new object is placed and gets connected
automatically.
However, if you want to select all objects inside your Design Area, then press CTRL + A, when the focus
is on Design Area pane. Now, you have grouped multiple objects. You can see a dotted border around
selected objects. You can do one action and it is performed commonly to the selected objects. You can
drag selected objects and move them all together accordingly. Connectors are adjusted automatically
in this scenario as well. You can click the Delete icon in the Design Area toolbar to delete all the
selected objects.
1. Click a connector to select it. The Connector Properties dialog box is displayed. You can also see
both the connection points of the concern connector are displayed in blue, which indicates that
the concern connector is selected.
3. Select appropriate value from the Pointer list. Connector is now customized according to your
requirement.
Properties of a connector
2. You cannot drag a connector to move it. Instead, you drag and move the related
object.
1. Click a connector to select it. The Connector Properties dialog box is displayed.
2. Press Delete or click the icon in the Design Area toolbar. The selected connector is
deleted.
Appropriate alignment of objects in your automation project design diagram enhances readability. You
can align objects accordingly. A few visual tools have been provided to align objects appropriately.
Common approaches to align objects in automation project design diagram are:
Turning on Grid
A Grid is a graph with collection of vertical and horizontal straight lines located at same distance away
from each other. This grid works as a scale when you drag and move objects in your automation
project design diagram. For example, you can align objects alongside any line in the grid. Else, you
consider each square in the grid as a unit and measure alignments and the distances between objects.
You click icon in the Design Area toolbar to turn on grid. This icon is a toggle. You click the same
icon as well to turn off grid.
Snap to Grid is a tool that enables you to move an object exactly one unit in the grid. If you move an
object it moves to the next horizontal or vertical axis (displayed as straight line) in the grid. You cannot
move an object part of one unit in the grid.
Snap on grid
However, there is an exception. For example, Snap to Grid option is turned off currently. Your objects
in automation project design diagram are not aligned to grid. One or more object is positioned in
between the grid lines. If you turn on Snap to Grid option now, then also an object is displayed in its
original position. It is not automatically aligned to grid simply by turning on the Snap to Grid option.
Scenario when objects appear in the middle of an axis even with Snap to grid
You can align objects without grid as well. When you move an object free hand and its top or bottom
coordinates reaches top or bottom boundary coordinate of any other object, then a horizontal line is
displayed. Similarly, when you move an object free hand and its right or left coordinates reaches right
or left boundary coordinate of any other object, then a vertical line is displayed. Both horizontal and
vertical straight lines are displayed simultaneously, if required.
For example, top, and bottom boundary coordinates of an object ObjA are 20, and 30. You are
dragging and moving another object ObjB, which touches top coordinate 20. A horizontal line is
displayed along with coordinate 20 throughout the design area. Part of the same line between ObjA,
and ObjB, is solid and rest part is dotted. Similarly, a vertical line is displayed if right or left boundary
coordinates of ObjB comes across right or left boundary coordinates of ObjA.
Thumb View is helpful to view the complete automation project design diagram in one shot, without
scrolling the design area. You click icon in the Design Area toolbar to display Thumb View. This
icon is a toggle. You click the same icon again to turn Thumb View off. Scope of Thumb View is
indicated by a dotted rectangle inside the Thumb View. Scope of Thumb View depicts the part of the
Design Area currently displayed in your screen. You can move the dotted rectangle to modify the
scope of Thumb View. For example, your automation project design diagram is very large and difficult
to accommodate fully in the Design Area. Currently only right hand side of the automation project
design diagram is displayed. You need to view the left hand side part of it. You can either scroll and
navigate to the left hand side of the automation project design document, or move the scope
rectangle of Thumb View to left had side and the concern part is displayed in the Design Area now.
Scope for Thumb View is revised while scrolling through Design Area. If you scroll Design Area the
using either the horizontal or vertical scrollbar and navigate through various parts of your automation
project design diagram, then you can see scope rectangle of the Thumb View is updated
synchronously.
Thumb View is not updated simultaneously while drawing. It is updated only you finish a move. For
example, you want to move an object. You started dragging the object from its initial position. Thumb
View is not updated yet. You released your mouse pointer and dropped the same object in the target
(final) position. Now, Thumb View is updated.
You can drag and move the Thumb View, if it hides any object or simply for better viewing. You can
double click Thumb View to zoom in or zoom out it. This is a toggle.
An Object ID is a unique identifier to identify an object in an automation project. You can display it
alongside an object for ready reference. You click Show Object ID icon in the Design Area toolbar to
turn on displaying Object ID alongside an object. You use the same icon to turn off displaying Object ID.
This icon is a toggle. Object ID is used for identifying an object in the auto generated source code, if
required. However, Start, End, and Comment objects don’t have any Object ID.
For example, you are designing an automation project in Design view. Steps to locate an object in the
auto generated code are:
1. Open Design view, if Code view is selected.
2. Click Show Object ID icon in the Design Area toolbar to turn on displaying Object ID, if it is
not selected. Object IDs for all the respective existing objects are displayed.
3. Insert a Message Box object. A corresponding Object ID, such as “adb” is generated and
displayed for the newly inserted Message Box object.
5. Click the Find icon in the Code Area toolbar. Find dialog box is displayed at the top right
corner of the Code Area.
6. Click the text box inside in the Find dialog box to set focus on it.
7. Type the search text adb. All the instances of the search text are highlighted in the Code Area.
Focus is on the first instance.
You can select Ignore case option while evaluating a Control Value or a Variable Value in a condition. For
example, you are evaluating a condition in an If Condition object. The condition evaluates a Control
Value or a Variable Value with its counterpart a literal string or a global variable specified in the Value
text box of the If Condition Properties dialog box. You can see in the corresponding auto generated
code that both of these have been converted to lower case for evaluation purpose only. However, actual
value of the concern global variable is not changed. However, end user is to use this feature if the
corresponding values of literal, Control Value, or Variable Value is alphabetic.
An example depicts this feature even better. Consider a scenario, that a global variable is updated using
a Global Variable object at the beginning. Then an If Condition object evaluates the value and displays a
message accordingly. Steps to implement the same are:
1. Create a new automation project in VPE. A connected pair of Start and End objects is displayed.
3. Select the Global Variable object. The Global Variable Properties dialog box is displayed.
b. Type an alphabetic value, for example, “Sample String” in the Value text box.
c. Click Add. Global variable is added to the automation project. A confirmation message
“Value added successfully” is displayed in the status bar of the Global Variable object.
5. Insert an If Condition object in between Global Variable and the End objects. True path
connector is already connected.
6. Click the If Condition object to display the If Condition Properties dialog box.
a. Select Variable Value in the Condition For list. Details of the If Condition Properties
dialog box are displayed.
d. Type “sample string” with single or double quotes in the Value text box.
You are specifying a literal string value in this case. You can also specify another
variable type by typing the variable name without quotes.
8. Insert a Message Box object in the True path connector in between the If Condition object and
the End object.
9. Click the Message Box object to display the Message Box Properties dialog box.
b. Type You have selected Ignore case option in the Message text box.
11. Drag and connect the False path connector of the If Condition object to the End object. Note
that both True and False path connectors are connected to the same End object currently.
12. Insert a Message Box object in the False path connector just before the End object.
13. Select the Message Box object to display the Message Box Properties dialog box.
b. Type You have not selected Ignore case option in the Message text box.
15. Click Save icon in the VPE toolbar to save the project.
You launch GenieLauncher and run this project . You see a message box displaying a message “You
have selected Ignore case option”.
In this example, you have initiated a value of the global variable as “Sample String”. Both the “S”
letters in the text “Sample String” are in upper case. Value of the literal specified in the If Condition
object is “sample string”. Both the “s” letters are in lower case. Thus, if you turn on the “Ignore case”
feature then, both global variable value and If Condition literal value are converted to lower case and
thus both matches.
You can view the auto generated code in the Code view.
2. Select the If Condition object to display the If Condition Properties dialog box.
Now launch GenieLauncher again and play the same project. A message box is displayed that You have
not selected the Ignore case option.
If you do not select the “Ignore case” option in the If Condition object, then these values are compared
as it is (“Sample String” and “sample string” with actual case) and case of these two strings do not
match. You can view the auto generated code for this in Code view.
You can view auto generated code with and without selecting ignore case option for various other
objects for your understanding and exercise purpose.
Genie Player
If you minimize it, then it is minimized to system tray . You can double click the Genie
Player icon in the system tray to restore it.
3 Unit 1 Lesson 3
In this lesson you will learn about using cropped images for evaluating a condition, using scripts, and
adding triggers.
Opening Image Cropper and adding images for verification of a condition in Wait For Object, If
Condition, Switch Case, and Repeat objects.
Inserting triggers.
The objects from which you can invoke Image cropper from VPE for setting a condition are:
If Condition
Repeat
Switch Case
An example involving a few more other objects explores automation concept in a bit detail. Application
under test is to be different for various audiences. Hence, here a common application, Notepad is
sustained. This may not be a real life practical example, but definitely depicts the concepts in a simple
approach.
4. Press CTRL + H key to display the Replace dialog box. Focus is on Find what text box.
Now, your capture file is ready. This process is to be automated and played back. However, you need
to create an automation project based on this capture file and customize it accordingly.
1. Create an automation project named Replace Text.epp. A connected pair of a Start and an End
objects is displayed by default.
3. Click the newly inserted Robo Script object to select it. The Properties dialog is displayed.
5. Select Replace Text.gps file and click Import. An appropriate *.eon file is created and associated
with the selected Robo Script object.
7. Insert an If Condition object above the End object. A green color connector, with a label “True”,
is displayed by default.
8. Click the If Condition object to select it. The If Condition Properties dialog box is displayed for
the If Condition object.
b. Click Browse. The Image Cropper is launched and Open dialog is displayed.
c. Select Replace Text.gps and click Open. The steps in selected capture file are displayed
in Image Cropper.
d. Select the appropriate step. Select the step “Click Cancel” (step #19). Step image for the
same step is displayed along with control rect. This control rect area is to be cropped.
However, you can modify this rect to fine tune the cropped image.
f. Click Yes. Image Cropper is closed. The control you selected in the Image Cropper is
displayed in the Select Control text box in the If Condition Properties dialog box in VPE.
11. Click Wait For Object to select it. The Wait For Object Properties dialog box is displayed.
12. Set various values in the Wait For Object Properties dialog box as:
b. Click Browse button next to Select Control text box. Open dialog box is displayed.
c. Select Replace Text.gps and click Open. The same file is opened in Image Cropper.
d. Select the step with the description “Click Cancel”. The step image for the step is
displayed along with the control rect.
f. Click Yes. Control is set in the Select Control text box of the Wait For Object Properties
dialog box of the Wait for Object.
14. Click the Message Box object to select it. The Message Box Properties dialog box is displayed.
15. Set various values in the Message Box Properties dialog box as:
You can even insert one more If Condition object at this point to find out whether
the Cancel button is still disabled (timeout happened for Wait For Object) or by the time it
has become enabled.
16. Insert another Message Box object on any free area (not over any connector).
17. Drag a connector from the If Condition object and drop it to the newly inserted Message Box
object. It is marked as a False connector. Previous connector in the If Condition object is the
True connector.
18. Click the newly inserted Message Box object to select it. The Message Box Properties dialog is
displayed.
19. Set various properties specified in the Message Box Properties dialog box as:
b. Type in Replace dialog has been closed properly, in the Message text box.
21. Connect the Message Box object with a connector to the newly drawn End object.
It launches application under test “Notepad” and performs the steps specified in the capture file. It
enters the current timestamp and opens Replace dialog box. Then Replace dialog is closed. This is
according to the recording in the capture file. However, if the Cancel button in the Replace dialog is
disabled or Genie Player has failed to click Cancel then Replace dialog cannot be closed.
2. Right click the Scripts folder in the Projects pane. A popup menu is displayed.
3. Select Import GPS from popup menu. Open dialog box is displayed.
4. Select a capture (*.gps) file and click Import. Corresponding automation script (*eon) file is
generated and incorporated in the current project.
2. Right click the Scripts folder in the Projects pane. A popup menu is displayed.
3. Select Attach Script from popup menu. Open dialog box is displayed.
4. Browse and select an automation script (*.eon) file or a script library (*.js) file and click Import.
Corresponding automation script (*eon) file or script library (*.js) file is incorporated in the
current project.
You capture a process in Notepad. Name the newly captured *.gps file as “Find Text.gps”. First step in
the capture process is clicking the title bar of Notepad to set focus on it.
2. Press F5 key. Current date and time stamp is inserted. Cursor blinks at the end of it.
3. Press Home key. Cursor is displayed at the beginning of the text file.
5. Type zzz or any junk string in the Find what text box. This text is not supposed to be found.
This hard coded search string “zzz” won’t be part of your automation project. You
can display a text box runtime during playback and prompt end user to input search string
dynamically.
6. Click Find Next. A message is displayed that the same text is not found.
8. Click OK. The same message box is closed and Find dialog box is displayed again.
10. Click Cancel. Find dialog box is closed. Your process is ready.
11. Save the capture file with the name Find Text.gps.
You are done with the capture part. Now you need to create an automation project out of it. You need
to slightly manipulate the automation project to achieve the goal. Steps to automate the same are:
1. Open VPE and create a new project called Find Text.epp. The Start and End objects are displayed
by default.
3. Click the Robo Script object to set focus on it. Robo Script Properties dialog box is displayed.
c. Select Find Text.gps and click Import. Corresponding *.eon file is created and associated
with the selected Robo Script object.
6. Click the PE Form object to set focus on it. PE Form Properties dialog box is displayed.
e. Drag Text Control from Tool Box to Designer tab. A new text field is created in the form.
f. Click icon beside the newly inserted Text control. Properties of the same control
are displayed in the Properties tab of the Control Settings pane.
k. Click the icon beside Find Text in the Automation Scripts pane. All the steps with
mappable controls are displayed.
l. Map Text control to the appropriate step under Find Text by dragging the label of the
same to its corresponding step in the Automation Script(s) pane. Mapping clip icon is
displayed.
8. Insert a Global Variable object in between PE Form and Robo Script object.
9. Click Global Variable object to set focus on it. Global Variable Properties dialog box is displayed.
b. Type -1 in the Value text box. In the auto generated script, a variable named Count is to
be initiated with the value “-1”.
c. Click Add. A message is displayed in the Global Variable Properties dialog box that it has
been successfully added to the automation project.
14. Click the If Condition object to set focus on it. If Condition Properties dialog box is displayed.
c. Select Find Text.gps and click Open. All the steps in the same capture file are displayed
in the Image Cropper.
d. Select the step “Click OK”. Corresponding step image is displayed with control rect
highlighted.
e. Click OK. The same control of the step is selected. A confirmation message is displayed.
g. Select Visible from the Control Property list. Properties of If Condition object are set.
17. Expand the Scripts node in the Project pane. All the scripts available to the current project are
displayed.
18. Double click and select the Find Text.eon file to display its code.
19. Select all steps after “Click Find Next” to the last step and press CTRL + C to copy it to the
clipboard and them comment the same code in Code view.
21. Insert a Manual Script object in between End object and If Condition object’s True path.
22. Select the Manual Script object to set focus on it. Manual Script Properties dialog is displayed.
a. Paste code from clipboard using CTRL + V in the Script text box.
b. Append one line alert ('Search text found ' + Count + ' times'); to the pasted code at the
end in the Script text box.
25. Copy the code for the step “Click Find Next” to clipboard using CTRL + C and then comment it.
27. Insert a Manual Script object in the False path of the If Condition object.
28. Click the newly inserted Manual Script object to set focus on it. Manual Script Properties dialog
box is displayed.
a. Paste the selected code from clipboard using CTRL + V in the Script text box.
b. Append a line of code Count=Count + 1; at the end of the Script text box.
30. Connect the end connector of the last Manual Script object (in the False path) to the top of the
Timer object.
31. Click Save All to save all files in the automation project.
You are through with the designing part. Verify and review the project once.
1. Launch GeniePlayer.
2. Select Find Text.epp file and click Play . Playback starts. A form is displayed.
3. Type the letter, digit, symbol or text string you want to search in the Find What text box. This is
used as search string during playback.
4. Click Save. Form is closed and rest of the playback is completed. The number of occurrences of
the search string in the text of the open file is displayed.
2. Expand the Scripts folder in the Project pane. All the automation playback (*.eon) files and
script files associated with the current project are displayed.
3. Double click the appropriate automation playback (*.eon) file or script file to open it in Code
Area pane.
4. Place your mouse cursor in appropriate position in the Code Area, where you want the new
code snippet is to be inserted.
5. Click Insert Code Snippet icon from the Code Area toolbar. The Snippet Container dialog
box is displayed.
6. Select required function from the Snippets list. The corresponding code snippet is displayed in
the Snippet Output pane.
7. Click Import. The corresponding function call is inserted into Code Area.
8. Change parameter of the inserted function call according to your requirement. Code snippet is
ready now.
An email trigger initiates an automation playback when a specified email related event occurs, such as,
receiving an email from a specific email address, subject line consists of a predefined text etc. For
example, you can implement an email trigger, which initiates playback of an automation project on
receiving an email from reception@myengeneering.com with the subject line ”Pipeline Construction”.
A key event trigger is initiated when a predefined key is pressed. For example, initiate playback of the
automation project for opening tax calculation form in the Employee Payroll application, when SHIFT +
CTRL + Y key is pressed. Hence, on pressing the same key combination, Genie Player initiates playback
of the corresponding automation project.
2. Right click the Triggers folder in the Projects pane. A popup menu is displayed.
3. Select Add Trigger from popup menu. Open dialog box is displayed.
4. Select a trigger (*.etf) file and click Import. Selected trigger file is incorporated in the current
project.
You can add a blank trigger to the automation project. Steps to do so are:
2. Right click the Triggers folder in the Project pane. A popup menu is displayed.
3. Select New Trigger. A new trigger (*.etf) file is displayed under the Trigger folder in the Project
pane.
5. Press Enter. A new blank trigger is created and associated with the current automation project.
2. Expand the Triggers folder in the Project pane. All the triggers associated with the current
project are displayed.
4. Click Rename.
You can delete triggers associated with the current automation project. Steps to delete a trigger are:
2. Expand the Triggers folder in the Project pane. All the triggers associated with the current
project are displayed.
An example of JavaScript code for an email trigger has been provided. You can use the same by
changing condition and target automation project name. This example initiates automation playback
of “SAP.epp” if an email from director@myconsulting.com is received in outlook email client. You need
to copy this code to an *.etf file and implement it.
//Change automation project name here. This project is launched when the trigger is fired.
var projectData=new PlayerCoreLib.PlayerCoreLib.ProjectData('SAP.epp');
var mailItem=obj;
var mailInfo="From"+mailItem.From+
"\nTo"+mailItem.To+
"\nCC"+mailItem.CC+
"\nBCC"+mailItem.BCC+
"\nSubject"+mailItem.Subject+
"\n Body"+mailItem.Body+
"\nBCC"+mailItem.Body+
"\nBCC";
QueueAdapter.QueueAdapter.ProjectQueueAdapter.PlayProject(projectData);
}
//Other Mail properties that you can access from mailInfo object
//ReceivedDate
//SentDate
//Attachment (List<Attachment>)
//Folder
//Processed
//Category
//Read
//Type
//IsAttachment
//MessageBox.Show(mailInfo);*/
});
function Dispose()
{
connector.disconnect();
}
An example of a key board trigger has been provided. This example initiates automation playback of
the project play.epp. User is to press key combination CTRL + SHIFT + W to initiate the trigger. You can
change the key combination and automation project name and store it in an *.etf file to implement it
as a trigger.
The first parameter in the HotKeyNotifier.Register function is the key code for the key modifiers, such
as CTRL, ALT, and SHIFT. Key code for CTRL key is 4, and SHIFT key is 2. Thus the adding these two you
get the value of the first parameter 6 (in the following example code). The second parameter is key
code of the key pressed, i.e. W, which is 87. The third parameter is the name of the automation project
to be launched. In this example, it is play.epp.
4 Unit 2
This unit is a recap and practice session for you. It consists of:
• Summary
• Assessment
• Exercise
4.1 Summary
VPE enables you to create an automation project from a recorded capture file.
You can insert objects, such as Robo Script, Manual Script, Start, End in an automation project.
Each type of objects serves a specific goal. For example, Timer object is used for delaying
playback.
You can insert your own script, branching, looping etc in an automation project.
Objects are connected to each other by connection points. Objects in an order connected by
connection points determine flow of an automation project.
You can use cropped images for evaluating conditions in certain objects. The Image Cropper tool
is used for that.
You can insert readily available function calls from Code Snippet tool.
You can externalize your inputs. The Form Builder tool enables you to create a form consisting of
various controls. This form is displayed during playback. The values you enter in this form are
passed on to automation playback.
4.2 Assessment
Select the correct answer:
Answers:
a. II and IV
b. I and II
#2
#3
If you want the automation playback is to be suspended until a control, for example a button, is visible
you can design so by using:
b. Timer
c. Global Variable
#4
b. Start Loop connector and End Loop connector have distinct labels for individual identification.
d. epiGenie Player lists all the Script files available in your computer and selected script file is played
back.
e. A trigger can invoke playback of an automation code on pressing a predetermined and specified key
combination.
4.3 Exercise
Create an automation project to open the Page Setup dialog box in Notepad. If Portrait is selected then
select Landscape or vice versa.