Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / sireesha

If you want to close all browsers except gmail browser then you will follow this code.
set ObjDesk = Description.Creation
ObjDesk("micclass").Value="Browser"
set ObjDec =Desktop.ChildObjects(ObjDesk)

BroCount=ObjDec.Count

msgbox BroCount

if BroCount >0 then

for i=BroCount-1 to 0 step-1
if Instr(1,Browser("CreationTime=&i").GetRoproperty("name"),"gmail")=0 then

Browser("CreationTime:=&i").Close
End If
Next
End If

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the extension of QTP local Repository? If it is .mtr then what is .bdb extension stands for?

1145


What is data driver in qtp?

1025


how can we compare descriptive programing with a regular expression

2402


How to analyzing the checpoint results?

1052


How to associate shared object repository to test in qtp?

1006


How many types of actions are there in quicktest professional (qtp)?

972


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

1068


Hi all Can u give me the link where we can download full version of qtp my mail id is karthic.venkitapathi@gmail.com

1788


How does qtp recognize objects in aut?

1045


Without using gui map editor we can recognize the application in winrunner ?

1059


When and why to use descriptive programming?

1054


How to export quicktest professional (qtp) results to an .xls file?

1185


what is the diff b/w assistive and mandatary rules of object repository in QTP???

2185


Limitations in QTP?

2165


What is synchronization? What are the ways you can synchronize?

1160