I noticed there is an issue in my script.
Set oB=Description.Create
oB("micclass").value="Browser"
Set handler=Desktop.ChildObjects(
oB)
For i = 1 to handler.count-1
Browser("title:=.*","index:=" &i).Close
Next
=====================================
I hope this will work well . I do not have QTP unfortunately to test this.
Also my assumption is index =0 is the parent browser , which is opened
first.
And then all the child browsers are opened,
On Wednesday, 30 October 2013 19:00:32 UTC+5:30, Satnam Singh wrote:
>
> Please try this
>
>
> Set oB=Description.Create
> oB("micclass").value="Browser"
>
>
> Set handler=Desktop.ChildObjects(oB)
> For i = 1 to handler.count-1
> Browser("title:=.*","index:=1").Close
>
> Next
>
> On Wednesday, October 30, 2013 5:23:36 PM UTC+5:30, 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.