Object Identification

24 views
Skip to first unread message

anil

unread,
Dec 8, 2008, 3:51:55 AM12/8/08
to QTP Automation Experts Group
Hi everybody,

I have a opened Browser say "www.gmail.com" in IE 6. I would like to
get the object of this opened Browser and in turn their child objects
like pages, editboxes, buttons etc...

Please help me on this.

Thanking everyone in advance

gopikrishna Chowdhury

unread,
Dec 9, 2008, 12:19:37 AM12/9/08
to qtpaut...@googlegroups.com
Here is the code for that..

Set Obj = Description.Create()
Set AllObjects = Browser("BrowserName").Page("PageName").ChildObjects(Obj)
Msgbox AllObjects.Count

--
Thanks & Regards

Gopi Krishna Chowdhury Mullapudi
Software Engineer
Satyam Computer  Services Ltd
Hyderabad
Voice:9908218203
Email:gopikrishn...@gmail.com

Ramu Goud

unread,
Dec 9, 2008, 12:31:59 AM12/9/08
to qtpaut...@googlegroups.com
Hi Gopi,
 use For Each loop to get the ojects
 
Eg:Set parentObject = Browser("BrowserName").Page("PageName")
 Dim Child
For Each Chld in parentObject

     Log.Message  Child.Name(i.e Child.PropertyName )

 
Next
 
I think now u understand .....ok bye

Swapnadeep

unread,
Dec 9, 2008, 12:46:30 AM12/9/08
to QTP Automation Experts Group
Just to add more detailed count:

Set Obj = Description.Create()
Obj("micclass").Value = "WebTable" - This value can be
anything "WebTable" or "WebEdit" or "WebLink"

Set ObjTable = Browser("BrowserName").Page("PageName").ChildObjects
(Obj)
Msgbox ObjTable.Count

Thanks & Regards,
Swapnadeep.
http://technologicaguru.blogspot.com

On Dec 9, 10:31 am, "Ramu Goud" <ramu6...@gmail.com> wrote:
> Hi Gopi,
>  use For Each loop to get the ojects
>
> Eg:Set parentObject = Browser("BrowserName").Page("PageName")
>  Dim Child
> For Each Chld in parentObject
>
>      Log.Message  Child.Name(i.e Child.PropertyName )
>
> Next
>
> I think now u understand .....ok bye
>
> On 12/9/08, gopikrishna Chowdhury <gopikrishna.chowdh...@gmail.com> wrote:
>
>
>
> > Here is the code for that..
>
> > Set Obj = Description.Create()
> > Set AllObjects = Browser("BrowserName").Page("PageName").ChildObjects(Obj)
> > Msgbox AllObjects.Count
>
> > On Mon, Dec 8, 2008 at 2:21 PM, anil <anil.hung...@gmail.com> wrote:
>
> >> Hi everybody,
>
> >> I have a opened Browser say "www.gmail.com" in IE 6. I would like to
> >> get the object of this opened Browser and in turn their child objects
> >> like pages, editboxes, buttons etc...
>
> >> Please help me on this.
>
> >> Thanking everyone in advance
>
> > --
> > Thanks & Regards
>
> > Gopi Krishna Chowdhury Mullapudi
> > Software Engineer
> > Satyam Computer  Services Ltd
> > Hyderabad
> > Voice:9908218203
> > Email:gopikrishna.chowdh...@gmail.com<Email%3Agopikrishna.chowdh...@gmail.com>
Reply all
Reply to author
Forward
0 new messages