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

Answer Posted / gangadhar

set objbrowser=Description.Create
objbrowser("micclass").value="Browser"
set a=Desktop.ChildObjects(objbrowser)
msgbox a.count
for i=o to a.count-1
s=a(i).GetRoProperty("Title")
If instr(s,"Gmail")=0 Then
a(i).close
End If
Next

Is This Answer Correct ?    9 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How will you report the bug and explain the defect tracking sheet you handled?

2558


Differences between text and test area checkpoints?

586


What are the advantages of a Hybrid framework?

603


terminal services client

1791


What are the different attributes used with regular expression?

555






write script for bitmap image?

1546


Hi Frenz... I would like to take up the QTP certification . Can anyone tell me what is the procedure. n if anybody have the study materials pls fwd it to jkpunathil@gmail.com

1502


i can done the project with QTP in that time i can say how many members in my team size?

1372


How to use checkpoints in qtp ?

588


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1446


How do Parameterization and Data-Driving relate to each other in QTP?

560


Does Low-level recording capture mouse movements?

586


how do you parameterize search button from the website? the page is a single winobject and i have made a virtual object button of search button but search box can't be converted into a winedit and if we try to convert it into winedit the value we enter in a searchbox appears as numbers in the script so we arent able to parameterize.help!!!

1740


How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..

1630


Can testing be done on the production system, or will a separate test system be required? How are browser caching, variations in browser option settings, dial-up connection variabilities, and real-world internet 'traffic congestion' problems to be accounted for in testing?

621