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

What is TOM in QTP?

0 Answers  


assume i have few url link how will i dynamically call then using descriptive programming?

0 Answers   BirlaSoft,


when i try to recognise a winmenu item it does not allow me to do that but recognises it as window..i am using qtp 9.2 could someone help with this

3 Answers  


how do u retrieve data from a database ? i.e. i want to retrieve 2nd record only from a database ? write code for this. by using ADODB connecton, RSOBJ and using a FOR loop we can retrieve all the records( ex: if we give query as select * from emp). but i want only 2nd record. so how to acheive this.

2 Answers   Accenture,


Suppose there are 10 browsers opened on desktop. I want to close all browsers except one browser in QTP. Can any one give the code for this?

7 Answers   IBM,






Difference between image checkpoint and bitmap checkpoint

4 Answers  


what is Business Process Testing plz explain?

7 Answers   iFlex,


Explain about merging of two repositories?

3 Answers  


Hello, Can we capture only the labels of the web page in the object repository. If yes, then how. Actually my scenario is: I have to capture all the label of mercury site http://newtours.mercuryinteractive.com/tour/mercurypurchase. php. and want to copy all these labels in the notepad. So,please help me how to do this all. Thanks in advance, Gaytri

4 Answers  


Why bpt?

0 Answers  


What is Descriptive Programing? In which cases, we will go for descriptive programing?

2 Answers   CTS,


How will u test content of an web application with out using chechpoints in QTP 9.2?

3 Answers   CTS,


Categories