If there are some browsers opened and I don't how many browsers are open, Now I want to close all the browsers that I don't know how many are opened.
What would be Descriptive programming for this in QTP using VB Script..???
Please send your answers.

Answer Posted / mogal

Set odesc=description.Create
odesc("micclass").value="Browser"
Set BrowCol=Desktop.ChildObjects(odesc)
For i = 0 To BrowCol.Count-1
BrowCol(i).Close
Next

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When I click on a link in web page.Link should open in new window.can anyone please let me know the script for this ---Koti

2481


Both static and dynamic arrays are handled by the vb script. Is it true?

548


How do client side image and server side image work?

1378


How to export quicktest professional (qtp) results to an .xls file?

590


Which functionalities of QTP used in banking project? pls any say answer?

1433






Suppose I want fail that check point? How can you do that?

594


What is object repository in qtp?

551


what is error and fault in terms of software quality?

1452


What is data driver in qtp?

564


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

1476


what function you write to do database testing with the help of qtp?

1353


Why is Client side image is preferred over server side image?

1434


hi i am working with vbwindow on qtp.first i am openning qtp whenever open qtp my application not open that time generated error like "Runtime error 0" and fatal error:automation error how to solve this problem pls tell me

1863


I want to read XML file loaded in Quality center and compare the values with the values displayed in Application (web table).How can I do that

1387


What is the use of text output value in quicktest professional (qtp)?

591