using descriptive programming how to close all opend browsers?

Answers were Sorted based on User's Feedback



using descriptive programming how to close all opend browsers?..

Answer / ravi

Set b=Description.Create
b("micclass").value="Browser"
Set obj=Desktop.ChildObjects(b)
For i=0 to obj.count-1
c=obj(i).GetROProperty("title")
msgbox " Closing.. " & c
obj(i).Close
Next

Is This Answer Correct ?    5 Yes 0 No

using descriptive programming how to close all opend browsers?..

Answer / amarendra kothuru

Do While(True)
If Not Browser("index:=0").Exist(0) Then
Exit Do
End If
Browser("index:=0").Close
Loop

Is This Answer Correct ?    3 Yes 0 No

using descriptive programming how to close all opend browsers?..

Answer / sagar jadhav

Guys instead of doing all the circus mentioned in all above
answers... below statement will close all IE brosers in one
go......

SystemUtil.CloseProcessByName "iexplore.exe"

That's it!

Is This Answer Correct ?    1 Yes 0 No

using descriptive programming how to close all opend browsers?..

Answer / balaji

Hi you can use thise code

For i= 0 to 5
browser("name:=Google").Close


Next

Is This Answer Correct ?    0 Yes 0 No

using descriptive programming how to close all opend browsers?..

Answer / naveen

while Browser("Creation Time:=0").Exist
Browser("Creation Time:=0").Close
Wend

Is This Answer Correct ?    1 Yes 1 No

using descriptive programming how to close all opend browsers?..

Answer / moin

Public function closeBrowser()
On error resume next
Ipval=Environment("Ipval")
err.clear
Browser(Ipval).Close
If err.description<>"" Then
Reporter.ReportEvent micFail,"Wait",err.description
End If
End Function

Is This Answer Correct ?    0 Yes 1 No

using descriptive programming how to close all opend browsers?..

Answer / shobha

asdfdsfdf

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More QTP Interview Questions

how can i prepare for QTP(8.2) to face interview ? give over view details?

52 Answers  


How to modify object property in qtp ?

0 Answers  


How to read a text file from QC using QTP. I would like to do something like this. But instead read a file from QC and NOT from my local drive. Set fso = CreateObject("Scripting.FileSystemObject") Set InputFile = fso.OpenTextFile("C:\test.txt", ForReading) Thanks

0 Answers  


How can I find out whether a word in a string is existed or not for example "QTP IS A POWERFULL TOOL FOR AUTOMATION" How can i find out whether "powerfull" is existed in the above string or not Could anyone answer it?

7 Answers   Livetek,


i am new QTP... please tell me automation frameworks , types & for whiich type of applications frameworks are used & how to generate script in keyword driven framework

0 Answers   IBM, TCS,






What are the different types of action?

0 Answers  


write is the code for regular expression in QTP

2 Answers   IBM, Infosys,


Explain about opening notepad in QTP and writing of test result in notepad?

4 Answers  


Client is able to provide budget..he want you to choose the automation tool for the web application? which one you will select ? QTP or Selenium ? what are the reasons?

0 Answers   CTS,


Write the code for select the 5 values from drop down list. drop down list having the 10 values.

6 Answers  


how to test power point using QTP 8.2 ? What are different methods to retrieve value from Application during runtime ?

3 Answers   HCL,


WHAT IS SMATR IDENTIFICATION? plz EXPLAIN BRIEFLY? IS IT POSSIBLE in QTP? HOW AND WHEn THE SITUATION U R USING EXPLAIN WITH EXAMPLE?

3 Answers  


Categories