I've been using this to refer to my browser object
StrBrowser = "Name:=MyTitle.*"
and everything works fine.
However, now my browser title is changing so I want to use a more accurate way of using this browser so I went for:
strBrowser = "creationtime:=0"
This seems to have brought my script to a grinding halt and I'm wondering why.
Does anyone have any ideas?
Everywhere's within walking distance if you have enough time.
Stephen this works fine for me and my applications always have 2 or 3 concurrently open browsers.
One thing I always do is set the object sync timeout to 2000 miliseconds and disable the Smart Identification.
My linkedIn Profile
I switched off Smart Identification, my object timeout it 60000 (1 minute) because some if the pages take a long time to appear and the sync was timing out before the page had appeared.
I've been investigating a bit more using this code:
strt = timer
Browser(strBrowserID).Page("index:=0").WebEdit("na me:=" & pstrType).set pstrValue
When strBrowserID = "name:=Office.*" the script flies along the message box shows times of less than half a second.
Using "index:=0" or "creationtime:=0" slows the script down and it seems to consistently adds 10 seconds to the response time.
I thought I'd worked out the problem, but it was a red herring. so I'm back to wondering why it seems to take 10 seconds longer if I use index instead of name. [ 10-14-2005, 03:22 AM: Message edited by: Stephen Kay ]
Have you tried Browser("micClass:=Browser").Page(micClass:=Page")
That's the puppy Mark, it now works like a charm.
I still don't understand it, but I've given up trying, I'll just it to the growing list of things that don't make sense to me.
Only thing you need to remember with this is having another browser open can confuse QTP with this. If you are manipulating multiple concurrent browsers as part of the test you should use:
Browser("CreationTime:=0") 'for the 1st opened browser
Browser("CreationTime:=1") 'For the 2nd open browser and so on