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...

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

Answer Posted / pravati

set obj=Description.create()
obj("micclass").value="Browser"
set brsrobj=Desktop.childobjects(obj)
msgbox brsrobj.count
for i=0 to brsrobj.count -1
x=Browser("micclass:=Browser","creationTime:=&i-1").Getroproperty("name")
if instr(x,"xyz')=0 Then
Browser("micclass:=Browser","creationTime:=&i-1").close

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the concept of object repository & how qtp recognizes objects?

1036


Can anybody let me know how to test the Drag and drop feature of the column in a .net application...eg..i hav to test the drag and drog feature of a table(swftable) in a application..plze help!!

2151


Write a script to verify font style and color of a windows object using descriptive programming

1319


How to Upgrade or support firefox 2.0 version on QTP 9.0? I have installed QTP 9.0 and installed firefox 2.0. But in REcord and Run Settings, it shows firefox 1.5 in Web tab for browser selection.

2225


What is the latest version of qtp?

1032


How do you create new test sets in td?

977


what is stepin & stepout?

1793


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

1986


What is an expert view and keyword view?

1056


How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks

3205


Explain the differences between table and db checkpoints?

945


wht is Manual Testing Frame work. Pls anybody can give appropriate answers

2029


How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1978


What Folder Structure following in Keyword Driven Frame work?

2716


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?

984