| || |
Changing Object Repository defintions
I hope this question is straightforward:
Is there some way in QTP to do a global search replace in the OR, so that I could replace all instances of string “server1” with string “server2”?
Various objects in my Object Repository contain URLs as one or more of their properties. For example, a link’s href property being set as follows:
href = http://www.server1.mycompany.com/securedhome.jsp
A considerable amount of these objects with the above URL-dependent properties exist in my OR, because the scripts were recorded/built via the server1 environment (note that server1 is part of the above URL).
Now, lets say that the QA testing environment is redeployed onto a new server, say server2, so that the actual URLs would now be something like
This renders my scripts, wherever the OR refers to server1 in the URLs, potentially useless (depending on configuration of Smart Identification and other possible object recognition features that QTP uses).
It seems there are two general ways to mitigate this situation.
1) softcode all URL references with regular expressions, so that the hard-coded
becomes something like ”
This would require finding all such occurrences in the OR, and correctly soft-coding them with reg expressions.
2) (the real question I am asking)
Is there some way in QTP to do a global search replace in the OR, so that I could replace all instances of string
server1 with string server2?
Re: Changing Object Repository defintions
Install QTPPlus from QTP CD which has got functions to talk to OR to create/change and modify properties.