[Wtr-development] Convio's version of Watir
notethan at gmail.com
Wed Oct 20 12:53:00 EDT 2010
regarding functionality of converting a html table into an array of hashes -
I have recently pushed this to Vapir:
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.
On Tue, Sep 21, 2010 at 17:19, Jari Bakken <jari.bakken at gmail.com> wrote:
> On Tue, Sep 21, 2010 at 8:38 PM, Ethan <notethan at gmail.com> wrote:
> > 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
> > 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
> Wtr-development at rubyforge.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Wtr-development