Quality is delighting customers
hi all,
I had interview question
we are using shared object repository
how we can handle the test scripts when there is change in object hierarchy in QTP
Tags:
Permalink Reply by Subbu on February 16, 2012 at 3:35pm Good Question and broad answer. Here you go.
Instead of OR (object Repository) use DP to avoid huge maintenance.
Here is example:
Assume you need to click on OK button in AUT v1.0 and it has this hierarchy:
Browser -> Page -> Frame -> OK button
Code:
Set objHome = Browser("title:=xyz").Page("title:=xyz").Frame("name:=xyz")
objHome.WebButton("name:=OK").Click
Now in AUT v2.0 there is no frame means:
Browser -> Page -> OK button
So just change objHome variable definition. This is an example only, depends on no. of times / modifications you need to apply various logics.
--Subbu.
Permalink Reply by kiranmayi on February 16, 2012 at 5:55pm Use Dynamic Scripting to Handle Dynamic programming .
or else try to run the script in maintenance mode i think it will work
Permalink Reply by Subbu on February 16, 2012 at 6:59pm Kiranmayi,
Cann you explain bit more or give an example for following sentence given by you:
"Use Dynamic Scripting to Handle Dynamic programming"
Permalink Reply by kotla lakshmi kanth reddy on February 16, 2012 at 10:02pm For this type of situations Descriptive Programming is the better solution:
When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decreases the performance of QTP while recognizing a object.
Permalink Reply by Sandeep Panghal on February 17, 2012 at 11:19am Also, these type of scenarios mostly comes while automating FLEX based applications...
© 2012 Created by Quality Testing.