Hey Dmitry,
I found this code on your blog-site to close all browsers.
----------------------------------------------------------------
While Browser("CreationTime:=0").Exist
Browser("CreationTime:=0").Close
Wend
----------------------------------------------------------------
This code works well and closes all instances of IE. But what question arises in my mind is - when I SPY on IE Browser I can't see any property called "CreationTime"; so how does it work?
Regards,
Ordinal identifier is the method used by QTP to index object with similar property,i have explained this at
http://testingideas.wordpress.com/2008/08/26/object-repository-and-descriptive-programming-in-qtp/
Thanks for simplifying the browser closing code; even this code works on both IE & Firefox. I tried to execute the same logic on Google Chrome browser, QTP is identifying Google Chrome browser as windows object. Enclosing sample code, I guess most of our QTP scripts will not work when we try executing on Google Chrome browser. This is again going to be challenging task for us, if our applications try to supporting Google Chrome browser, then we need to think on modifying scripts. I would like to share this information with you all. Keep up the good work... All the best...
Window("Google Chrome").Activate
Window("Google Chrome").WinObject("Google").Click 373,50
Window("Google Chrome").WinObject("Google").Click 532,57
Window("Google Chrome").WinObject("Google").Click 588,51