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 the difference between wait and synchronization point?

3 Answers  


how to write regular expression for Date field?

12 Answers   Google,


How do u write a regular expression for date (dd/mm/yyyy) field ?

4 Answers   Semantic Space,


Can any one explain about environment variables with examples?

2 Answers  


How can i parameterize the standard checkpoint using Excel sheet where my expected values are there?? suppose i want to test a application with diffent value and want to run 5 iteration?? for each iteration, values will be exported from excel sheet as input. Now i will store some expected values in the excel sheet, which i want to check in the application whether expected equals to actual value??? can any one help me

1 Answers   CSC,






What is throw object?

1 Answers  


I am using descriptive programming for my project.when QTP deosn't identity or recognize a object by record and playback method,is it possible to make QTP identify that object using descriptive programming? Note: The object doesn't have unique properties and same properties used in Record and playback are only available, no extra properties are defined.

3 Answers  


Hi, Can we open a test in qtp10 which is saved in qtp 9.2?

0 Answers  


How many regression test suits in your appliction?

2 Answers   CTS,


Do you have any knowledge about Business Processing Testing in QTP

1 Answers   TCS,


how to capture the run time values of web table.

3 Answers   CTS,


Can we record using all the modes in a single script? Explanation with example is appreciated

0 Answers  


Categories