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

Answer Posted / venkat

3 menthods are these to close browsers

1) SystemUtil.CloseProcessByName "iexplorer.exe"
2) Do While Browser("creationtime:=0").Exist
Browser("creationtime:=0").Close
Loop
3)Set objWMIService =GetObject"winmgmts:\\.\root\cimv2")
Set colProcess = objWMIService.ExecQuery("SELECT * FROM
Win32_Process")
For Each objProcess In colProcess
If UCase(objProcess.Name) = "IEXPLORE.EXE"
objProcess.Terminate()
End If
Next

Regards,
Venkat
9986635974
bangalore

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to record a qtp script ?

548


What is the descriptive programming?

1507


How many types of recording modes are there?

588


Hoe can we do retesting using functions please give the code for it using login page

1553


Hi am New to Automation Testing , any one can you help me what are the basic questiion are asked an interview?

1419






If I give some thousand tests to execute in two days what do you do?

576


"What are the common constrains that we need to consider when we prepare testcases for ASP application". Thanks in Advance...

1436


can u please explain what is the exact difference between qtp8.2 and 9.0

1675


Hi, I got error message as "object does not support this property or method: "Test.Actions" when i execute the following line of script on QTP 9.0 Dim qtApp, qtRep Set qtApp = CreateObject("QuickTest.Application") Set qtRep = qtApp.Test.Actions("Action1").ObjectRepositories Can anyone tell me where i am wrong.

1510


How smart identification works in qtp ?

572


Hi How to retrieve data from web element line by line?

1571


what is actually contain test report? can anybody post the test report

1467


What are the different attribute used with regular expression?

527


What is environment variable in qtp and why to use it?

541


Are Shared ORs read-only?

621