if there r 10 windows open in QTP write a command to close
all 10 windows at a time ?
Answers were Sorted based on User's Feedback
Answer / sandip
Option Explicit
Dim ObjBrow,ObjName,ObjBrowName
Set ObjBrow = Description.Create()
ObjBrow(micClass).values = "Browser"
ObjName = Desktop.ChildObject(ObjBrow)
msgbox = ObjName.count
for i = 0 to ObjName.count
ObjBrowName = ObjName(i).getROproperty("Name")
msgbox(ObjBrowName)
ObjName(i).close
Next
Thanks,
Sandip Gami,
Cell No: 09986645937
Is This Answer Correct ? | 11 Yes | 1 No |
Answer / kamaldeep singh
If u are using iexplore then use this function
SystemUtil.CloseProcessByName ("iexplore.exe")
For mozilla only change the name i.e iexplore.exe
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / srinadh
You can use the following function. or simply
SystemUtil.CloseProcessByName "IEXPLORE.EXE"
Public Function CloseBrowser()
SystemUtil.CloseProcessByName "IEXPLORE.EXE"
End Function
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / 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 |
Answer / 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 |
Answer / arunsingh
By using
SystemUtil.CloseProcessByWndTitle "*.*", True
Is This Answer Correct ? | 4 Yes | 3 No |
Answer / a
By using "micclass", we should create Description object.
Then using For loop we count the Dialog objects, and close
it.
Is This Answer Correct ? | 1 Yes | 1 No |
Answer / ashok
closedCount = SystemUtil.CloseProcessByName("iexplore.exe")
'Display # of closed windows
MsgBox closedCount
If you want to know more refer this link
http://www.knowledgeinbox.com/documents/closingprocesses.html
Is This Answer Correct ? | 2 Yes | 3 No |
Answer / sudheer kumar putsala
if Browser("micClass:=Browser","index:=0").Exist(0) Then
Browser("micClass:=Browser","index:=0").Close
Above line of code will close all the open Browsers.
Is This Answer Correct ? | 2 Yes | 5 No |
Is there any MS Access addin in QTP?
How will you send values to a cell in a webtable using QTP?
Login to flight app, in window flight reservation set the date field and select flyfrom as Frankfurt and verify whether flyto list box has the item FrankFurt, log the results.
Synchronization methods?
how to invoke the web application through script in qtp
How to perform action on objects, If two objects have the almost the same name ? example : Object 1 : "Entry of Items" Object 2 : "Items" Whenever I ask QTP to perform an action on Object 2 it performs action on Object 1. Note: The two objects are present in an Oracle Application tree.
supose i hv to acsess some functionlaties of a test in 1 machin , some part other machin how can acsess?
How can i select multiple values from drop down list using vb script in qtp? and wt is the script for clicking msg box box automatically with a specific time. Thanks in advance...Kalyani.
1.explain end to end process of qc,2.how many tabs are in qc9.0,qc10.0 3.what is review, how many reviews are following in aproject 4.how will you get the requirements 5.why do we choose testing 6.how to export tc's and requirements to qc through add-ins
According to use, how virtual object is different from object spy? If Qtp is not learning a sub-menues. What should we done? how would we manage on the expert view too? alkaa.dugaal@gmail.com
hi can anybody help with an qtp 9.2 license key please. Thanks, Nitesh.
In a page i have N number of links at a time i would like to open those links by using QTP?how to do that?