Quality Testing

Quality is delighting customers

how to handle tests when object hierarchy was changed

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

Views: 192

Reply to This

Replies to This Discussion

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.

Use Dynamic Scripting to Handle Dynamic programming .

or else try to run the script in maintenance mode i think it will work

thank you

Kiranmayi,

 

Cann you explain bit more or give an example for following sentence given by you:

"Use Dynamic Scripting to Handle Dynamic programming"

   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.

Also, these type of scenarios mostly comes while automating FLEX based applications...

RSS

TTWT Magazine

Webinar

You Can


Call for Articles

Advertisement

Videos

  • Add Videos
  • View All

Badge

Loading…

© 2012   Created by Quality Testing.

Badges  |  Report an Issue  |  Terms of Service