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

Answer Posted / gangadhar

set objbrowser=Description.Create
objbrowser("micclass").value="Browser"
set a=Desktop.ChildObjects(objbrowser)
msgbox a.count
for i=o to a.count-1
s=a(i).GetRoProperty("Title")
If instr(s,"Gmail")=0 Then
a(i).close
End If
Next

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Connect to QC using AOM.

1463


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1666


What is ‘object spy’ and what is the function of object spy in qtp?

755


What is the use of sendkeys and what are send keys

2188


What is the file extension of the code file and object repository file in QTP?

840


Which features or drawbacks of QTP lead to the upgrade for a newer version?

751


Hi could some one explan what is the use of the function Defination generator, And how to use the function defination generator.. Explan with the example..

1555


What is a checkpoint? How many check points are there in qtp?

746


There is an excel file of 1 to 100 sheets how you will iterate through it?

756


what are the utilities and drivers

2038


Why qtp always start action1 and does not start action?

828


how to write the descriptive programming in QTP for remove the object value and substitute, with a variable then call the validation from excel

2101


Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji

1543


Presently i am working on QTP 8.2 Version,i want to know features in 9.2 version, because i have not sufficient time to put the effort on the 9.2 version

1602


What is test object model in quicktest professional (qtp)?

748