Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script failing as the Object name changes for each build
#1
Solved: 10 Years, 9 Months ago
Hi Ankur,
We have started using QTP recently in our office.I have started my regression suite with just 5 scripts and I am having difficulty maintaining those 5 scripts as the Object name that QTP assigns is changing for every build.How can I handle this time of scenarios in QTP ?

If you see at the following example. The names are different in 2 different build for the same object.

Build 1:
Code:
Browser("ADMServer Login").Page("ADMServer_3").WebEdit("ADMServerPanel1$ctl03$ctl05$Se_5").Set "100"

Build 2:
Code:
Browser("ADMServer Login").Page("ADMServer_3").WebEdit("ADMServerPanel1$ctl03$ctl05$ct_51").Set "100"
Reply
#2
Solved: 10 Years, 9 Months ago
Use regular expression here... I see only the last four letters/digits are changing in this case.

Go to object repository and change the description to

ADMServerPanel1$ctl03$ctl05$.*
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Solved: 10 Years, 9 Months ago
Thank you for the reply Ankur. I had to alter a little bit more inorder for this to work. I changed it to .*\$.*\$.*\$.*
Reply
#4
Solved: 10 Years, 9 Months ago
ok, good. Since we are using $ as a literal character and not as regular expression so u need to escape with \$ and not $
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)