[Wtr-general] Alternative for getElementsByClassName

Angrez Singh angrez at gmail.com
Sat Dec 16 02:39:03 EST 2006


Hi,

You can use elements_by_xpath to get all the elements that map to a given
xpath query. element_by_xpath will return you only the first element that
map to the xpath query.

Regards,
Angrez



On 12/15/06, Vamsee Krishna M <cooldudevamsee at gmail.com> wrote:
>
> Hi,
>
> I am using water nightly build(watir-1.5.1.1127). I have an Ajax app with
> more than 500kb of DOM in size. I need to get a bunch of table cells with
> specified class name. And I can't find any method equivalent of
> getElementsByClassName in watir. I tried to do the stuff with XPATH but As
> far as I know I can get only one element at a time using the method cell
> (:xpath, <xpath expr>). I also tried a last cruel method using regex since
> because of my apps DOM is very large Its not practical to roam around the
> entire dom.
>
> So If anybody have any solution please reply me with your solution.
>
> Thanks.
>
> Regards,
> Vamsee Krishna
>
>
>
> _______________________________________________
> Wtr-general mailing list
> Wtr-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/wtr-general
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20061216/79e05283/attachment.html 


More information about the Wtr-general mailing list