Professional Documents
Culture Documents
2
2
Two methods
UFT generates steps for every user action on AUT and simultaneously stores objects information
into object repository
Select record:
Record menu-record
Click ok
Stop recording
After recording
Run menu-run
During test execution UFT reads statements one by one from editor and gets objects information
from the object repository, based on that information performs operations on AUT.
Scenario 1:
Scenario 2:
Extra objects information available in object repository: no error and it will execute
Recording modes
i) Normal recording:
It is also called as standard recording or context sensitive recording.
It is default recording mode.
It records mouse clicks and keyboard operations based on objects.
For each operation there will be individual steps will generate in the script.
Drawback: Unable to record mouse continuous operations.
First select normal record mode and then select analog or low level record mode.
Without select normal record mode we can’t select other modes.
Drawbacks:
1) It occupies more memory than normal recoding then UFT execution performance
will be decrease.
2) It doesn’t generate steps for every user action on AUT, it records all user actions in a
track file, so test is not readable as well as editable.
iii) Low level recording
It records some operations on non-supported environments.
Drawbacks:
1) It occupies more memory than normal recoding then UFT execution performance
will be decrease.
2) Low level recording considers all objects in two category only
Window-parent, Winobject-child object. So test script is not readable.
Advantages of recording:
Disadvantages of recording:
1)Systemutil:
2)Repositoriescollection
3)Environment
4)Services
5)Reporter
Object repository:
a) Local repository
UFT creates a local repository for every action during recording.
Local repository file will be saved along with the test.
Tester can edit local objects
b) Shared object repository (external file)
Extension is .tsr (text shared repository)
User creates shared object repositories either by adding objects or by exporting local objects.
It is external file user has to create and maintain these files.
User can edit shared objects.
i) Add objects:
Open the dialog box or window or web page (AUT)
Select resources menu
Object repository manager
Object menu
Add objects or add objects icon
Show the window
Select option
Click ok button
Save the repository with tsr extension.
4 types of filters:
1) Selected object only ( UFT will store selected object only, no child object)
2) Default object types ( all objects which are having functionality, without static)
3) All object types (all objects including static also means without functionality, any
messages)
4) Selected object types then select which class of object you want
When to choose add objects feature and when export local object?
When there are few objects available in a window or web page use add objects.
When there are thousands of objects but we want to store few objects that time choose.
6) Associate shared object repositories or load shared object repository during execution:
Resources menu---associate repositories---click on + symbol---browse the path of the shared
repository—associate –click ok—
Or
Solution explorer---right click on test---associate repository with action.
We can associate multiple actions.
Why we need to associate shared repositories?
In order to create and execute tests manually (without recording).
If it is recording UFT creates local repositories and it uses local object information while test
execution.
If user wants to create tests manually then create shared objects repositories and associate.
Load:
Syntax:
Repositoriescollection.add “path of the shared repository file”
(objects,methods,functions)
Steps:
Step generator: it is a library of functions and utility objects used to generate recordable and non-
recordable steps.