write a script to close all open browser in qtp except one
browser whose name is xyz

Answer Posted / guest

Set odesc=Description.Create
odesc("micclass").Value="Browser"
Set a=Desktop.ChildObjects(odesc)
For i = 0 To a.count-1
t=a(i).GetRoProperty("Title")
print t
If Trim(t)<>"xyz" Then
a(i).Close
End If
Next

--Ganesh

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to find array size in qtp?

585


How we can import data from database?

651


Suppose I want fail that check point? How can you do that?

600


How can we conduct U-I Testing by using QTP??????

1431


How to create scenario selector

1485






What is reusable action?

608


how to prepared for first for the first interview?

1801


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1454


what is run-time data?

1699


how to know no.of mails in our g mail by using vb-script

1782


I want to capture data(using keyword) from msdos application using QTP?... Below is little work i could do on it... /* Set app=CreateObject("Wscript.shell") SystemUtil.run ("C:\Users\Agent\Desktop\pumpsim\PUMPSIM.EXE") Window(“PUMPSIM.EXE”).Activate wait(3) app.sendkeys "N" */ Thanks in advance...!!!

1439


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

1440


How do you open adobe acrobat file in QTP and do some testing on that file ?

625


Explain more about the Test Fusion Report of QTP?

608


How to use parameterization in qtp?

624