---------- Forwarded message ----------
From: Jian Fang <[email protected]>
Date: Thu, Oct 22, 2009 at 7:30 PM
Subject: Re: how to find all child objects?
To: Super Fan <[email protected]>


Why not define a UI module that will return multiple matches. Then, for each
return value, we can provide the corresponding XPath for it (reverse
Engineering of jQuery selector might be a bit more difficult). In this way,
you can act on the returned UI directly.

This indeed is useful for certain scenarios, but it may make your test code
difficult to maintain. If possible, define a UI module for each UI you want
to test first.


On Thu, Oct 22, 2009 at 5:33 PM, Super Fan <[email protected]> wrote:

> It would help.  I am not sure if you are familiar with the Mercury (HP now)
> tool suites, QTP to be exact.  In QTP, you can get all child objects from a
> page.  Then, you can filter objects base on types (links), etc.  What I'm
> after is find all the link objects in a web page and traverse them.  Now,
> you mentioned getAllLinks() method which I tried and it returns them, but my
> problem is my links don't have ID attribute.
>
> - superfan911
>
>
> ------------------------------
> *From:* Jian Fang <[email protected]>
> *To:* super fan 911 <[email protected]>
> *Sent:* Thu, October 22, 2009 10:41:59 AM
> *Subject:* Re: how to find all child objects?
>
> If you really need them, we can add the support using jQuery, i.e., get
> back web elements by their tag names. I would expect the result sets could
> be pretty big for complicated html pages.
>
> Thanks,
>
> Jian
>
> On Thu, Oct 22, 2009 at 1:20 PM, super fan 911 <[email protected]>wrote:
>
>> All child objects, i mean all GUI objects: links, buttons, images, etc
>> on a web page.  There's a minor problem with the methods you mentioned
>> thou, what if there is no ID specified for the element?  The getAllX
>> methods returns the correct size, but I can't do nothing about it
>> because there's no ID.
>>
>> Thanks,
>> superfan911
>>
>> On Oct 21, 7:26 pm, Jian Fang <[email protected]> wrote:
>> > What do you mean all child objects of a page? If you mean the whole html
>> > source, you can use
>> >
>> > getHtmlSource()
>> >
>> > For others, you can try,
>> >
>> >    - String[] getAllButtons(): Returns the IDs of all buttons on the
>> page.
>> >
>> >    - String[] getAllLinks(): Returns the IDs of all links on the page.
>> >
>> >    - String[] getAllFields(): Returns the IDs of all input fields on the
>> >    page.
>> >
>> >    - String[] getAllWindowIds(): Returns the IDs of all windows that the
>> >    browser knows about.
>> >
>> >    - String[] getAllWindowNames(): Returns the names of all windows that
>> the
>> >    browser knows about.
>> >
>> >    - String[] getAllWindowTitles(): Returns the titles of all windows
>> that
>> >    the browser knows about.
>> >
>> > However, it is really not recommended to create a UI module for the
>> whole
>> > page. Better to create a separate UI module for each UI section for
>> easier
>> > maintenance, you can put them in one groovy UI module class.
>> >
>> > Thanks,
>> >
>> > Jian
>> >
>> > On Wed, Oct 21, 2009 at 6:35 PM, super fan 911 <[email protected]
>> >wrote:
>> >
>> >
>> >
>> > > How do you find all child objects of a page?  Is it even possible?
>> > > How would you define the page UI model?
>>
>
>
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"tellurium-users" 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/tellurium-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to