
New #table_like formatter
Reported by Aslak Hellesøy | August 13th, 2009 @ 09:05 PM
In Cucumber I recently added a Webrat extension that can look up HTML tables and convert them to a 2D Array of Array of String. It also works with dl, ul and ol. The intention is to use it with Cucumber::Ast::Table#diff! but it could be useful for other purposes too.
More here:
I think this extension would be a valuable addition to Webrat proper. If you accept and merge my code (in my fork) I will delete the code from Cucumber.
Cheers,
Aslak
Comments and changes to this ticket
-
Aslak Hellesøy August 13th, 2009 @ 09:05 PM
Forgot the link: http://wiki.github.com/aslakhellesoy/cucumber/multiline-step-arguments
(See Diffing Tables) -
Aslak Hellesøy August 15th, 2009 @ 05:25 PM
My patch is here: http://github.com/aslakhellesoy/webrat/commit/0d9ff9e226cec4a1b2c71...
BTW, the title of this ticket should be "New #table_like locator", but I can't change it...
-
diabolo September 17th, 2009 @ 11:06 AM
Aslak
Tried to use this however your patch uses methods that are no longer in webrat. In particular css_search. Is their any chance you could update your webrat and adapt your code to use the new functionality. I have tried doing this locally in my own fork but I'm afraid I don't understand the code, and can't really do it just based on the commit history, because the commit that replaces this method 11f30d1d2e6b4cf49bf8990b80f47a6f85ea14ae is pretty big.
Many thanks
Andrew
Andrew Premdas
-
Aslak Hellesøy September 17th, 2009 @ 11:32 AM
Thanks for the heads up Andrew. I'll look into it and see if I can update my fork to use whatever new API webrat has now.
-
Aslak Hellesøy September 18th, 2009 @ 04:54 PM
I just pushed updates to my fork:
http://github.com/aslakhellesoy/webrat/commit/5d24ce2c5b35472448da8...
Bryan - what do you say?
-
Aslak Hellesøy October 9th, 2009 @ 08:26 PM
Is this going to be merged in or not?
Should I register this in the other issue tracker (http://github.com/brynary/webrat/issues) to bring it to your attention? ;-)
BTW - merged it with master again - it applies cleanly.
-
Bryan Helmkamp October 10th, 2009 @ 06:44 PM
Hey Aslak,
Sorry for the delay. While I think there might be a place for this functionality in Webrat at some point, I want to first figure out some broader questions about the API.
Originally, Webrat was only concerned with inputs and links. Now that's its usage has evolved, and it has Selenium support, I want to reconsider the API for finding and interacting with elements in general.
Once that's sorted out, I think there might be an easy way to incorporate this sort of functionality as a method on a Webrat::Element class or similar.
Cheers,
-Bryan
-
Aslak Hellesøy November 2nd, 2009 @ 05:44 AM
Hi Bryan, sorry for the delay here too :-)
If you give me a heads up when/if the new API is available I'll update my patch.
-
Aslak Hellesøy December 1st, 2009 @ 10:04 AM
Please close this issue. I have decided to keep it in Cucumber, bypassing Webrat using pure nokogiri.
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Ruby Acceptance Testing for Web applications.