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

How to perform cross platform testing and cross browser testing using qtp? Can you explain giving some example?

546


Plz Explain AUTOMATION REFERENCE MODEL?

1684


When to use shared and local object repository?

636


PLEASE TELL ME WHEN DO YOU USE THE OBJECT SPY AT RUN TIME

5964


How can you exit from an action?

613






What is keyword view?

566


What is the latest version of qtp?

588


What is Associate Repository in QTP 9.2 ?

604


what are the mandatory properties for a tex boxc (scenario?)

1531


Explain how you can replace string in qtp?

607


What is QTP testing process?

631


What is QTP and the use of QTP in TD?

602


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

604


Hi Guys, I want to place all of my values which i am getting it from a loop in to a global shee. For that i had written the script like this For i = 1 to ECOs-1 ECO = List(i).GetROProperty("innertext") DataTable.AddSheet("ECOList") DataTable.GetSheet("ECOList").AddParameter "ECOList",ECO AbortECO = DataTable.GetSheet("ECOList").GetParameter ("ECOList").Value msgbox AbortECO DataTable.GetSheet("ECOList").SetNextRow Using the above script, whenever the loop iterates it is creating new column "ECOLIST" in the sheet called "ECOLIST". It means, the values are displaying in the column wise even though i added the script " DataTable.GetSheet("ECOList").SetNextRow" . The cursor is not moving to the next line. Anybody help me out how to pass the values from script to the excel(Global/Local) sheet. Pls let me know @ nbabu11@gmail.com if you are not clear about the question.

1392


How to customize qtp?

614