How can xpath be used to return an array of divs? What would the xpath
look like?

On Apr 14, 10:30 am, Michael Hwee <michael_h...@yahoo.com> wrote:
> Can you try xpath?
>
>
>
> ----- Original Message ----
> From: "andrew.d...@lthree.com" <andrew.d...@lthree.com>
> To: Watir General <watir-general@googlegroups.com>
> Sent: Tuesday, April 14, 2009 7:54:53 AM
> Subject: [wtr-general] First level children only
>
> I have a large tree of nested divs, and I want to get an array of just
> the direct children of any particular div. I do not know ahead of time
> how many divs there will be at any level. Starting from a div, what is
> the Watir code for getting the divs that are direct children (and yes,
> there are other element types mixed in throughout)?
>
> Example
>
> <div id=1>
>   <div/>
>   <div>
>      <div/>
>      <div/>
>    </div>
>    <div/>
> </div>
>
> divs() returns the entire list of all descendant div elements. I want
> just the first level children.
>
> Andy- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to