How to close all other browsers,except gmail,yahoo? - 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 Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: How to close all other browsers,except gmail,yahoo? (/Thread-How-to-close-all-other-browsers-except-gmail-yahoo) |
How to close all other browsers,except gmail,yahoo? - kalyani0820@gmail.com - 12-05-2011 Hi all, Suppose there are many browsers which are opened, i want to close all browsers except gmail, yahoo, google. How should i script this in QTP? Thanks in advance..... Kalyani RE: How to close all other browsers,except gmail,yahoo? - PrabhatN - 12-05-2011 Hi Kalyani, I don't understand on what situation you may need to leave few browsers and close rest all. Anyway, to achieve this, you can use the code below: Code: bIndex = 0 'Set Browser index to 0 There is another built-in functionality provided by QTP. That might not be pertinent to your case but you may want to explore. Go to Tools-->Options-->Web Here you can see an option "Ignore the following browsers" where you can add your required browser details which QTP will ignore during record/run. RE: How to close all other browsers,except gmail,yahoo? - kalyani0820@gmail.com - 12-08-2011 Hi prabhat, Thanks a lot, your code worked without any changes.........but i dint understand logic completely.....i mean how it works, though u gave comments. I din understand line no:2,4. Thanks for ur time. Kalyani |