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 to connect to data base?

2 Answers  


What is the Diff between Image check-point and Bit map Check point?

3 Answers   Crea,


qtp script for recording and running the application.need script for short cut keys like f3,f4 etc.how to write script for recording?

2 Answers  


7. Given scenario is like this: One Web table is there and you have to search and retrieve a cell data which is equal to the given number say:123. Assume you have given with the column name/id of the table where the number may exist. So now you have to go to the given column and search for the number 123 and retrieve it along with the row number of it.

4 Answers  


What is runtime objects and test objects? What is the difference between them?

7 Answers   IBM,






How can i initiate the objects to find uniquely in OR

0 Answers   IBM, Livetek,


I want to scroll down in MSPAINT (captured a screen already). So that I can read the data in it through the step Window(paint).GetVisibleText for my validation. Anyone know the scripting for this?

1 Answers   TCS,


OPening of notedpad in QTP to write and execute the coding?

2 Answers  


How to change the Default synchronization method time and where?

4 Answers  


How i can use Regular expression in QTP?give detailed steps for it.

2 Answers  


If I am scripting Web-based Surveys using QTP that open up differently but at the exact same point require a username and password can I automate that username and password for all the surveys some how using QTP?

0 Answers  


We have a dynamic webtable where rows keep on adding.I have to click on particular row where the status changes to Update or Save.How do you click on Status(either it can be Update or save)

2 Answers   IBM, Infosys,


Categories