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

dim oBrowser,oAllBrowser,nProcessId,nCounter

set oBrowser = Description.Create
oBrowser("micclass").vlaue="Browser"

set oAllBrowser = Desktop.childObjects(oBrowser)

for nCounter=0 to oAllBrowser.count-1

if(instr(oAllBrowser(nCounter).getRoProperty
("title"),"xyz"))<=0 then
nProcessId = oAllBrowser(nCounter).getRoProperty("process
id")
Systemutil.closeProcessById nProcessId
End if
else
oAllBrowser(nCounter).close

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the difference between data driver & data driven and driver script?

2758


How is the Bitmap checkpoint different from Image checkpoint?

1119


In an interview, what r the general questions asked in SQL which is realted to testing ?pls give me anwser to this question?

2013


what is clean sweep?

1992


what is ODC and GDC?

7883


What is an object repository?

1052


Is it possible to split an action? How?

1113


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1980


How to capture all the data of a webtable, weblist and combolist using QTP?

3343


What is Cross browser testing? Does UFT support it?

1129


hi, FOR 3+ QTP INTERVIEW, FOR EXAMPLE WE PUT ONLINE BANKING SYSTEM PROJECT IN OUR RESUME, IN PROJECT MANAGER ROUND...WHAT R THE MAJOR QUESTIONS ARE ASKED IN P.M? PLS TELL ME ATLEAST 10 QUESTIONS?.....AND IF POSSIBLE POST ANSWERS ALSO....

2935


When to use descriptive programming?

1127


For which type of projects the iterative model is not suitable?

1889


How many tabs are available in debug viewer pane?

1112


How to test the login page in different ways in automation testing and i need code?

1944