Hi all, this is probably simplistic but I wanted to get a few opinions on how best to tackle the update of one of my tests as I'm still a novice with QTP and I don't want to waste my time doing it the wrong way.
The issue is relatively simple:
I have a java app who's main window is identified as:
We now have a new version of the software that runs in two diffeent modes, local or remote. So the main window is now titled either:
JavaWindow("HSM Manager - Remote")
JavaWindow("HSM Manager - Local")
The test script is pretty large so there are many references to it in many different actions. Now I guess I could run this in maintenance mode and update all the objects, but that only does it for one mode. I'd like to be able to say, if running in 'local mode' use this object, otherwise use this one. However there are so many references to this object that I didn't want an IF statement for each one.
Is there a much easier way that I can go about updating it the test?
Maybe get it to identify the window in a different way?
I am also a little confused about why when I update an unknown object in one action it doesn't update that same object in another action (sorry maybe that's a second question).
Anyway, any help or suggestions are much appreciated.
Well if everything except for your JavaWindow is the same in both the versions of your application then may be you can use regular expression for the JavaWindow object in your OR. You can modify the property which identifies the title with something like
'HSM Manager - Remote | HSM Manager - Local'.
Your code will then execute for both the types of windows.
Answer to your 2nd question is that both the actions must be having their local OR and NOT a shared OR thus the update done in one Action is not reflected on the other Action.
Thanks. Using 'HSM Manager - Remote | HSM Manager - Local' works as a way to use either. [img]/images/graemlins/smile.gif[/img]
Unfortunately you're right it seems I went with the default local Object Rpository not a shared one which is a real shame. I guess thats what comes from jumping in and using the tool without any training available [img]/images/graemlins/wink.gif[/img]
I think I saw in the help it said you can merge objects from a local OR into a shared one. Has anyone ever tried this and is it relatively straight forward or does it become very troublesome.
In my case I guess I'd be merging the local object repositories of the upwards of 120 actions all of which use the same objects to a certain degree. Does that sound feasible..?