-> It store the object information ( Object Properties and corresponding values).
-> Which are the object is stored in object repositry is called Test object.
-> During the recording Generate the vb script operation which object present in the application and store the object information in object repository.
-> objest repository have the following object informations
Ex: Dialog("login").WinEdit("AgentName").set "arunrajvdm"
login object informations are in OR
-> Properties and values
Name = Login
Class = dialog
Repository = local or shared
text = login
nativeclass= #32770
How to identify the object in AUT using OR
During the runtime Its compare the object type, object name and html tag from Object repository (These values are stored into OR while recording) and compare with object type, object name and html tag present in the application. once it match then QTP identify the object and perform the operation mentioned in QTP script.
if there is any mismatch the object information, then its throw the error like object was not found in the object repository
Ex: Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "arunrajvdm"
object details from OR (under Test object Details)
Type = text
name = Email
html tag = INPUT
object details from AUT
Type = text
name = Email
html tag = INPUT
if both are matched then QTP identify the object.
Operations on object repository
1) Delete the object from OR
select the object and delete
2) Add the objects in object repository
we have the add symbol (+) to add the object in object repository.
3) Change logical name (Object name while in recording)
If we are change logical name, its not effect for QTP identify the object. Because QTP identify the object by using object Type, name, html tag.
Ex: Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "arunrajvdm"
object details from OR (object Properties Details)
Logical name = Email
5) Higlight in the application
This option used for identify the object in application from which object present in the object repository.
if we change the logical name. then its diffcult to identify the object in application. So we have one option for highlighe in the application. From that we can identify the object.
6) Locate in the Repository
This option used for identify the object in Object repository from which object present in the application.
7) Change the property value in Object Repository
Ex: Browser("Gmail: Email from Google").Page("Gmail: Email from Google").WebEdit("Email").Set "arunrajvdm"
Type = text
name = Email
html tag = INPUT
we should not change above property value because if we change the above value, then QTP unable to find the object.
if any object property value present application will change according to the requirements, that time we no need to change the entire script. that time we can use this option for change property value based on the requirements.
After property value change then we no need to change the script, because the script always use the logical name. the logical name remains samein the object respository. then we no need to change.
No comments:
Post a Comment