How to Close all browsers in reverse order.

Answers were Sorted based on User's Feedback



How to Close all browsers in reverse order...

Answer / suresh

Set oBrowser = Description.Create
oBrowser("micclass").value="Browser"
Set oAllObjects = Desktop.ChildObjects(oBrowser)
msgbox oAllObjects.count
For i = 0 to oAllObjects.count-1
Browser("CreationTime:=" & i).close
Next

Is This Answer Correct ?    4 Yes 0 No

How to Close all browsers in reverse order...

Answer / suresh

Set oBrowser = Description.Create
oBrowser("micclass").value="Browser"
Set oAllObjects = Desktop.ChildObjects(oBrowser)
msgbox oAllObjects.count
For i = oAllObjects.count-1 to 0
Browser("CreationTime:=" & i).close
'msgbox (Browser("CreationTime:=" & i).GetROProperty
("Title"))
Next

Is This Answer Correct ?    1 Yes 0 No

How to Close all browsers in reverse order...

Answer / sri

When each browser is opened using QTP, each browser would
have a creation time property associated with it. You can
take this property to close browsers in which ever order
you need.

Is This Answer Correct ?    2 Yes 5 No

Post New Answer

More QTP Interview Questions

Per-Action Vs Shared repository?

5 Answers  


how to tell about testing a website in interview using qtp?? what r the points to be covered mainly?

2 Answers  


What is the difference between Action and Function.? when both has the same functionaltiy, when do we choose Action and when do we choose Function..??

3 Answers   DST Global Solutions,


what is the diff b/w assistive and mandatary rules of object repository in QTP???

0 Answers  


difference Between Call Run action and copy of action?

3 Answers   Quest,






Can you do more than just capture and playback?

2 Answers  


Syntact for how to call one script from another? and Syntax to call one "Action" in another?

1 Answers  


How to resume the second iteration in the QTP,, if the error has intrupted the the second iteration. When i use run from step it starting from the first iteration again.

1 Answers  


I have a library function , with that function 100 scripts are being called. The library function is changed(something is added) . how do i update all the scripts.

1 Answers   IBM,


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


A web page title might be xxxx@xyz.com or xxxy@xxx.co or xyz@abc.in.Using what mandatory properties can be the page identified.Give the regular expression for that.

3 Answers   Virtusa,


What is reusable action?

0 Answers  


Categories