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

In qtp is it possible to check broken links of a page?

586


What is active screen?

564


Sql questions to find second max salary and how to use joins

961


Explain different recording modes?

584


Hi, I am using OutputCheckPoint and I am storing the value in the data table. The stored value for column:bedroom:"Bed:4" The another value for column:bathroom:"Bath:2 Full,1 Partial" I need only the no 4 from the first column. I need only the no 2,1 from the second column. I used split array,but it also show array(0) has the value"bed:4" ..... Even though I highlight only 4,It is seleting the full value "bed 4".How can I get only the nos Thank you Uma

1304






I am a newbie to QTP / Automation testing. I want to develop a script that creates a data file automatically with proper headings using VBScript in QTP.

1586


Can you write a script to check if the folder exists or not?

515


Tell me one scenario, the complex functionality you have automated in your project?

1476


What is data driver in qtp?

578


How u will do versioning in QTP?

1462


what is defenetion of kiran can u tell me plz CVS, SVN

1572


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

1399


suppose i login into gmail page after that i read all the messages (say 10 messages) i have to send (SAVE) the messages in Html,notepad and i have to replay(Compose) send the messages please give me the code and give mail id so that i can clear my question

1488


How can I open a EXCEL file from QTP Resultviewer with reporter.ReportEvent function call. Example: Test files for details click "here". And clicking "Here" in the resultviewer will open a local EXCEL FILE.

1814


can i change the runtime properties of an object ? How can i check if a parameter exists in database ?

1415