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

Explain advantages and disadvantages of ddf?

0 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,


I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing

0 Answers  


write is the code for regular expression in QTP

2 Answers   IBM, Infosys,


explian qtp frame work and what is the use of it? what is the neceecity of this? explian detail?

2 Answers  






What are the Mandatory Properties of WebTable Object and Link Object in Web testing using QTP

2 Answers   iLink,


i have 2 year experience in manual and automation testing, I have less percentages in X, Xii (Second grade), can i elgible to TCS interview (Or MNC's)

3 Answers  


Can I compare two DataBases using QTP ?

1 Answers  


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

1 Answers  


for example u can take ebay or plifcart online shoping web application--------- write acode in vbscript in qtp---- search box and write (iphone6)and click on go button then opened diff prise iphones in next page but u can select 30,000 to 90,000 list pls write code? 

2 Answers   FFASVA, Genpact, Wipro,


anyone can explain Diff B/w Actions and Functions

2 Answers  


How do you check ticket cost and ticket number in flight application?

0 Answers  


Categories