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

How to replay a script in qtp?

0 Answers  


Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?

2 Answers  


request to add whatsapp grp for test engineer

1 Answers  


How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object

0 Answers  


Dear All, How to generate Pass or Fail Report in QTP without using Reporter.Report Event Method ? Thanks Balaji

0 Answers   TCS,






Give a comment on Regular Expressions using QTP?

4 Answers  


Among the 3 Recoring modes,Standard, Analog and Low Level. which one is mostly used. I know that Analog id used for Graphs, Digital Signatures and Barcoding. so, which one among the 2?

1 Answers  


can some one help me how to compare the values from one sheet to values in another sheet? suposse i have a feild called Temp in action1 and i also have temp in action2. i want to compare the values of those two actions sheets data table? how can i do it using descriptive programming?

1 Answers  


1) after inserting the check point how to change the expected value that was captured while inserting the check point

2 Answers   TCS,


Please explain about unicode compatibility in QTP. how we can able to use it. Please help me

1 Answers  


I want two test two agents login for the flight website. Here is the scenario: I want to go through 1-3 rows for one user login and other user login I want to go though 3-5 rows. How would you set this up in qtp. Thank You

0 Answers   IBM,


How can you write the scripts that operate on different objects depending on run-time information?

0 Answers  


Categories