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

In qtp, explain what is crypt object

0 Answers  


Explain about Table and DB Checkpoints?

1 Answers   Crea,


What are the different types of action?

0 Answers  


How to customize qtp?

0 Answers  


1>How to get the browser name by writing the VBScript. 2>How did you used the GetROProperty and GetTOproperty .give real time scenario. 2>Give and real time ex for the bug having "High Severity and low priority"on banking doamin web based application.

2 Answers   Nous,






What is quicktest professional window?

0 Answers  


How to supress warnings from the "Test results page"?

6 Answers   BirlaSoft,


what is KEYWORD DRIVEN TESTING ? I M NOT ASKIN WHAT IS KEY WORD VIEW PLZ ANS FOR ONLY WHAT IS KEYWORD DRIVEN TESTING EXACTLY THANX

3 Answers  


What test cases can you automate using QTP?

0 Answers  


How will you report the bug and explain the defect tracking sheet you handled?

0 Answers   TCS,


IN A WEB PAGE THERE IS TWO WEB BUTTON WITH SAME OBJECT PROPERTY AND VALUE, SO HOW I WILL IDENTIFIE OBJECTS INDIVISUALY.

3 Answers  


does test plan is in test strategy or test strategy is in test plan.

6 Answers   Microsoft, TCS,


Categories