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

Answer Posted / manjunathareddy

Dim iIndex
iIndex=0
While Browser("CreationTime:="&iIndex).Exist(1)
Title=Browser("CreationTime:="&iIndex).GetRoProperty("title")
If InStr(Title,"xyz")=0 Then
Browser("CreationTime:="&iIndex).Close
If iIndex<>0 Then
iIndex=iIndex - 1
End If
Else
iIndex=iIndex+1
End If
Wend

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?

1586


unique properties of button,edit box, radio button,check box?

3831


What are the Test design techniques you uses in ur project?

1489


how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?

1422


How to modify object property in qtp ?

567






A FORM CONTAINS 5 FIELDS. 1 FIELD IS ENABLED REMAINING(4) FIELDS DISABLED. MY QUESTION IS ENTER VALUES INTO 1 FIELD AFTER THAT CLICK TAB BUTTON THEN 2 FIELD ENABLE THIS PROCESS CONTINUE UPTO 5TH FIELD. HOW TO WRITE CODE IN DESCRIPTIVE PROGRAMMING. PLZ TELL ME THE PROCEDURE AND CODE FOR IT.

1284


In qtp, how you can remove the spaces from string?

549


hi, can u tell me the QTP TEsting process in present real time companies?(beware of this... now a days Recording is not using,, only DP) and don't tell note book answers like step 1 spep2....like this .......post answer with professional skills in simple english words) thank u

1335


What is the quicktest professional testing process?

534


How software tester can use constants and variables in scripts?

1689


hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career

1932


Any body have QTP 9.5 licence key. please provide me at madhukar_dec30@yahoo.co.in

1603


I have enrolled for a QTP course which is a four weekend course.Do you think its a good way to start off learning this tool?What all do i need with me in order to become a pro at using this tool?

1677


What is the architecture of your project? Can any one answer for this question plz........

1413


How can i check items sorted or not in a weblist ? Give me the script for this...

1580