write a script to close all open browser in qtp except one
browser whose name is xyz
Answer Posted / gangadhar
set objbrowser=Description.Create
objbrowser("micclass").value="Browser"
set a=Desktop.ChildObjects(objbrowser)
msgbox a.count
for i=o to a.count-1
s=a(i).GetRoProperty("Title")
If instr(s,"Gmail")=0 Then
a(i).close
End If
Next
| Is This Answer Correct ? | 9 Yes | 1 No |
Post New Answer View All Answers
How will you report the bug and explain the defect tracking sheet you handled?
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
How to suppress warnings from the test results page?
what is error and fault in terms of software quality?
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
Differences between quicktest professional (qtp) and winrunner?
What are the check points can be inserted without recording?
What is text/text area checkpoint?
The hybrid framework can be implemented for any application. Is it true?
What is qtpro? What is a quick test professional?
banking project description for software tester
what is meant by function library?Public and private functions in function library? if private functions are applicable for only for the particular test means then y we have to add those to function library?
How many types of recording modes in qtp? Describe each type with an example where we use them?
requirement is for combo box your expected value is str= "Denver.Frankfurt.London.Los Angeles.Paris.Portland.San Francisco.Seattle.Sydney.Zurich" you must get the text in combo box and need to compare them how
How to do the scripting. Are there any inbuilt functions in QTP? What is the difference between them? How to handle script issues?