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

How to use debug tools?

2186


How to interact tool & application build in QTP?

1452


action contains public and private functions but do we resuable that action or not..If it is reusable How..plz tell me the ans

1620


How many types of recording facility are available in quicktest professional (qtp)?

592


Explain the checkpoint in qtp?

581






What is QTP’s model for test creation?

665


How to analyzing test results using quicktest professional?

560


Limitations in QTP?

1735


what is error and fault in terms of software quality?

1499


How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?

561


Explain advantages and disadvantages of ddf?

589


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

564


i want information about API testing and i want info like how process can be done in company? i want added info like coding ,debugging, desing in c.v ? what should add in c.v for eg banking domin? pls any answer my question?

1596


write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading

1474


if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp

23871