There is one parent browser and 'n' number of child browsers
on desktop. Write a code to close all the child browsers but
parent browser should not be closed.



There is one parent browser and 'n' number of child browsers on desktop. Write a code to..

Answer / vishnu

'Create Description Object
Set oDesc = Description.Create
oDesc("micclass").Value = "Browser"
oDesc("openurl").Value = "about:Tabs"

'Loop through the collection and close each browser
If Desktop.ChildObjects(oDesc).Count > 0 Then
For X = Desktop.ChildObjects(oDesc).Count To 1 Step -1
Browser("CreationTime:="&X).Close
Next
End If

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More QTP Interview Questions

can u explain relative path architecture framework in qtp?

0 Answers   Mindlance,


Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?

3 Answers  


How to use QTP for Regration testing, plz tell as with short Example of login window? plz tell as....

2 Answers  


what is command for executing files?

0 Answers   VSoft,


In what occasion we can specify global sheet and action sheet?

0 Answers  






How will you check that your test cases covered all the requirements?

0 Answers  


How can we disable popup blocker? (I think it means when we get a pop up messge(its error) how we wil disable that one with out interrupting normal process)

6 Answers  


Explain types of output values?

0 Answers  


In qtp, explain what is qrs file?

0 Answers  


What phases are involved in testing an application in qtp?

0 Answers  


How can we use regular expressions for a table in web page, each cell in table having unique identification, Now I want to count number of rows in table and enter data in all cells of the table?

1 Answers   CTS,


the develeper not accepter your defect what status is that ?

1 Answers  


Categories