Suppose there are 10 browsers opened on desktop. I want to
close all browsers except one browser in QTP. Can any one
give the code for this?

Answer Posted / rico

just made a small correction. Here goes the updated answer



Set browserDesc = Description.Create()
browserDesc(”application version”).Value = “internet
explorer 6"

Set Allbrowsers = DeskTop.ChildObjects(browserDesc)
BrowserCnt = Allbrowsers.Count

For i = 0 To (browserCnt -2)
Allbrowsers(i).Close
Next

Set browserColl = Nothing
Set browserDesc = Nothing

Is This Answer Correct ?    7 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe synchronization point.

724


what is object and child object.. explain ..if possible give some example for better understanding ..

1691


Describe the differences between functions and actions in UFT?

752


Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

3450


what and how to answer for the question "tell me about yourself ?" for 3 years experience. can anyone say inj detail please... its urgent

1482






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

704


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?

1610


what frame work you are following?

1668


banking domain description for software tester for interview

3618


Hi all can any one give me roles and responsibilities for QTP (not WINRUNNER)

3368


Explain different type of event trigger option.

671


What is difference between design time and run time data table?

745


What does mean by Scope of Automation?n How we defined it?

1713


Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.

1698


Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.

781