Micro Focus QTP (UFT) Forums
Run QTP scripts Different URLs - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions)
+--- Thread: Run QTP scripts Different URLs (/Thread-Run-QTP-scripts-Different-URLs)



Run QTP scripts Different URLs - shiran - 07-15-2008

Hi,
I am new to QTP
I have recorded QTP scripts on one URL.ex : auto-ustage.com. Now I have to execute the same scripts on different URL ex: a1.ustage.com. Since there are so many scripts and it is difficult to change the Object repository for each and every script. Looks like if I use Descriptive I have to change line by line,. Please suggest me any other way.

Code:
Browser("ABC@http://auto-ustage.com").Page("ABC@http://auto-ustage.com").WebEdit("username").Set  adminlogon
  Browser("ABC@http://auto-ustage.com").Page("ABC@http://auto-ustage.com").WebEdit("password").SetSecure 123123
  Browser("ABC@http://auto-ustage.com").Page("ABC@http://auto-ustage.com").WebButton("Login").Click
Now I have to run on a1.ustage.com browser URL.
Please help. Thanks,
shiran


RE: Run QTP scripts Different URLs - niranjan - 07-16-2008

You can maintain one shared object repository for all your scripts.
For more info, please check QTP user guide


RE: Run QTP scripts Different URLs - surya_7mar - 07-28-2008

Either you can create a Object Repository with the description text property as "ABC@http://.*\.com"

Steps:
Add a Object Reposrtiy Entry
Edit the Property Value
Check the Regular Exp Check Box
Now change auto-ustage to .*

Or
You can write the regular exp using

Code:
Browser("text:=ABC@http://.*\.com").Page("text:=ABC@http://.*\.com").

I am just using text as the sample property, use whatever property that is showning the object repositroy.
if you want to have more info you can send me a mail surya.penumacha@gmail.com