regarding functionality of converting a html table into an array of hashes -
I have recently pushed this to Vapir:
http://github.com/vapir/vapir/commit/c1f28e017a1b8a781ac09b14ec26bb90f73532bd

<http://github.com/vapir/vapir/commit/c1f28e017a1b8a781ac09b14ec26bb90f73532bd>I
called it #to_hashes - I might have gone with #hashes if I'd remembered that
jarib had called his that, although I do not know if the functionality ends
up being the same. looking at the watirspec test of it, it looks like it
should be the same.

mine is rather more complex than jarib's because the apps I have had to test
do some interesting things with colSpan that I have to account for, and have
varying numbers of header and footer rows that need to be excluded from the
data. so, while looking through that code, phrases such as "unreadable mess"
might come to mind, that really is the simplest implementation I could
manage that satisfies all the tables I have to deal with.

-Ethan

On Tue, Sep 21, 2010 at 17:19, Jari Bakken <[email protected]> wrote:

> On Tue, Sep 21, 2010 at 8:38 PM, Ethan <[email protected]> wrote:
>
> http://github.com/bret/convio_watir_extensions/blob/master/lib/convio_watir_extensions/watir.rb#L110
> > This looks handy. I have code to map a table to an array of hashes keyed
> > with column headers, which seems to be of similar intent. Not sure about
> the
> > API, #column is not a very informative name for the method.
>
> The watir2 branch of watirspec has Table#hashes for this, taking a cue
> from Cucumber's Table object.
> _______________________________________________
> Wtr-development mailing list
> [email protected]
> http://rubyforge.org/mailman/listinfo/wtr-development
>
_______________________________________________
Wtr-development mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-development

Reply via email to