Micro Focus QTP (UFT) Forums
is there any setting to avoid "_2" being added to a object name, while recording - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: is there any setting to avoid "_2" being added to a object name, while recording (/Thread-is-there-any-setting-to-avoid-2-being-added-to-a-object-name-while-recording)



is there any setting to avoid "_2" being added to a object name, while recording - blanchedsouza - 06-13-2008

Hi,

If I record for the first time, objects will be added to the object repository. After this, when I save it and 2nd day If I again start recording, for the same object, it creates a new hierarchy by adding "_2", "_3" for browser and page. How to avoid it.
e.g.
BrowserName
|_PageName
|_Object1Name
BrowserName_2
|_PageName
|_Object1Name
|_Object2Name
|_PageName_2
|_Object1Name


RE: is there any setting to avoid "_2" being added to a object name, while recording - sreekanth chilam - 06-15-2008

Hi blanchedsouza,

Just apply regular expressions for Browser,pagename,Objname' s title/name properties...

I hope ur prob. will be solved....

let me know if you are having any issues.....


RE: is there any setting to avoid "_2" being added to a object name, while recording - blanchedsouza - 06-17-2008

Hi sreekanth,

For me problem is, none of my description properties is changing, but still it adds new logical name to browser and page.


RE: is there any setting to avoid "_2" being added to a object name, while recording - Ankur - 06-17-2008

probably you have multiple browser windows(your app) open at the same time while recording.
QTP in that case will assign "creation time" ordinal identifier to every new browser window and hence will change the name.


RE: is there any setting to avoid "_2" being added to a object name, while recording - niranjan - 06-18-2008

Like Ankur said in the above post, there might be multiple browsers or
IEProcess must have been running in the backend. Go to task manager and close Iexplore.exe process. Now open QTP and then the browser and record.