I've released, with the kind permission of Slando, Test::HTML::Form which makes testing HTML and HTML::Forms considerably easier.
The API is loosely based on Test::HTML::Content, but it use HTML::Treebuilder and re-uses parse trees and objects where possible, making it much quicker - it also uses filenames instead of passing strings around, and has additional methods for extracting strings and testing form elements easily
So far it's already made a lot of testing easier, but I already have a wishlist of extra features - like being able to extract HTML::Elements easily, provide urls instead of filenames, and allow extra tests on more form elements.
Anyway.. its in SVN at code.google.com and on CPAN
Re:Mech
TeeJay on 2009-02-04T08:53:41
That would be great.
I'd like to be able to use it to test web pages over the web or locally.
Not sure what changes would be needed to make it work nicely - currently you would fetch a page using anything and then test the saved file.
Really I'd like it to make that a lot easier.
Re:Mech
petdance on 2009-02-04T15:02:45
actually, we'd want to work with Test::WWW::Mechanize.
I can't look at it now, but I welcome your ideas.Re:Mech
TeeJay on 2009-02-04T21:16:40
Yes, I had a look at that - significant overlap, but didn't do what I needed at the time.
I'll probably go a different route and maybe allow you to pass a LWP or perhaps Mech object instead of a filename.