Micro Focus QTP (UFT) Forums
How to run recorded script on Production server - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: How to run recorded script on Production server (/Thread-How-to-run-recorded-script-on-Production-server)



How to run recorded script on Production server - thakkarbhav - 06-03-2009

Hello,

I am using QTP 10.0. I want to know that how can i use same script on Test server as well as Production server. Both server URLs are different.

Example:

Test server: http://testserver/ApplQA

Production server: http://www.Application.com

I got below error when i tried to run script on Production server.

Error: "The object was not found in the Object Repository. Check the object repository to confirm the object exists."
Any suggestions?

Thanks in advance.


RE: How to run recorded script on Production server - Ankur - 06-03-2009

Ideally there shouldn't be any problem while running your scripts on different instances of same application. Find out exactly which property value is different between two versions, see if you can parametrize them or change them to reg ex...
If nothing works have conditional statement for these objects whereby the value should be picked depending upon the instance on which you are running the script.


RE: How to run recorded script on Production server - thakkarbhav - 06-03-2009

Can you provide me sample code for "If...Then..End If" Statement.

The problem is that I recorded my script on Production server and then try to run on Test Server by editing the URL part of the script then QTP throws an error telling that OR does not have object for Test server URL. so we need to do something to add those objects in OR for Test server.

Also Test server applicaiton pages will have all URLs pointing to Test URL so here also things will change. It is not just matter of first line of the script where URL is specified. How to handle that?

Thanks,