if there r 10 windows open in QTP write a command to close
all 10 windows at a time ?

Answer Posted / eswar

cnt = 0
Set desc = Description.Create
desc("Class Name").value = "Window"
Set s = Desktop.ChildObjects(desc)
MsgBox s.count
For i=0 to s.count-1
x = s(i).Close
cnt=cnt+1
MsgBox x
Next
MsgBox cnt

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain how Does Run time data (Parameterization) is handled in QTP?

636


How will you declare a variable in qtp?

638


What is the basic concept of quicktest professional (qtp)?

670


what is the difference between development and testing

2571


What is a quick test professional?

748






How software tester can use constants and variables in scripts?

1778


How to analyzing the checpoint results?

608


When and why to use descriptive programming?

694


Hi, While recording a Jave based web application, its recording all my actions and the objects.And I have 5 WebEdit objects on the page and all are recorded. But while execution, at the 2 WebEdit object, its entering the value into the object (Its making a call to the AJAX, matching the value), when the control get out of this object the value is erased or cleared. Could anyone please help. I have recoreded 5 more scenarios where WebEdit is in the picture on different webpages and all are working fine. Here is my Script: Browser("Sign In").Page("Matching Workbench_3").WebEdit ("locationLookup").Set "0320 - SEATTLE-KM" Browser("Sign In").Page("Matching Workbench_3").WebEdit ("supplierNameLookup").Set "TRAMMO PETROLEUM INC" *** SupplierNameLookup is the object, which is haing an issue. And also I was using the SendString function, but it didnt work.

1857


HI Everybody, I am using QTP 9.2, I have a problem and hope everybody help me solve it. Now I need to use mouse wheel event to zoom in or zoom out in web client, but QTP can't catch this event. I look forward helping of everybody. Thank you very much.

1738


Where is the Bitmap checkpoint information stored?

1864


What are the types of object repositories? Which one is you using?

718


You will receive the mail in your outlook from client at night time to go ahead for the execution. Based on the mail you need to trigger the batch run. What is the QTP Code for this?

1438


How software automation specialist enter steps in the Expert View?

1763


Explain types of output values?

646