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

i have data in excel sheet.i imported the data in data table.while doing parameterization,how the code knows it is a valid or invalid data?

2 Answers   Fiserv,


is there any addin for remedy user application

0 Answers  


Hi, I am new to QTP testing and was exploring the frameworks used for automation. I wanted help in writing various scripts and files for keyword driven automation like 1. Control File 2. Test Case File 3. Startup Script 4. Driver Script 5. Utility Script . etc It would be great if someone can give help in this context ... Thanks

0 Answers  


How the exception handling can be done using QTP

6 Answers  


What are the different types of recording modes in qtp? Which will be used when?

0 Answers  


In QTP, while launching qtp application from startup.. we find Advanced Keyword-Driven Testing caption.. wht is that...Anybody can pls explain it. Thanks in Advance

1 Answers  


WHAT IS ENVIRONMENT VARIABLES?

7 Answers   AZTEC, CTS, Ready Test Go,


Could you suggest me best coaching for automation in Delhi or nearby area?

0 Answers  


After geting the modules where we generate the script ie in qtp or notpad ?

1 Answers  


what is recovery manager and recovey scenerio?

2 Answers   BirlaSoft,


when you press a link it displays "the page cannot be displayed" then as a tester how you will find the problem,what type of problem must be it?

3 Answers  


How should I check my code( Before going to execute) without executing the script in QTP

1 Answers  


Categories