Hi Venkat,

Try with this code:

strRequiredTab=<"Expected browser name NOT to be closed">

Set obj=description.Create
obj("micclass").value="Browser"

Set childObjs=Desktop.ChildObjects(obj)
childCount=childObjs.count
For i=0 to childCount-1
    strBrowserName=childObjs(i).getROProperty("name")
    If strBrowserName <> strRequiredTab Then
        strVal="hwnd:="&childObjs(i).getROProperty("hwnd")
        browser(strVal).close
    End If
Next



On 10/30/2013 5:23 PM, Venkat Kandula wrote:
Hi Friends,

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.

Thanks,
Venkat
--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

---
You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

--
--
You received this message because you are subscribed to the Google
"QTP - HP Quick Test Professional - Automated Software Testing"
group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/MercuryQTP?hl=en

--- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to