* Mark Stosberg <mark at summersault.com> [2003/12/03 16:22]: > Lately I've been using the excellent WWW::Mechanize module a good deal > to test web applications. As I've done this, I've noticed a number of > the same patterns coming up as I'm testing web-based forms. > > I'm wondering if there are any known modules out there for testing > forms represented as HTML::Form objects, or interest in helping create > such a module.
I had a hand in designing a web-based tester that used XPath expressions
to determine if resulting HTML contained appropriate elements. This
sounds like a technique that would be useful here, and anywhere else you
needed to test HTML or XML content. You could do something like:
my $html = get($uri);
html_xpath($html,
'//form[1]//[EMAIL PROTECTED] = "myButton"]/@value',
'Expected value');
Or something similar. html_xpath is a horrid name, but you get the
idea. I don't have any code to contribute (the original was implemented
by someone else, in Python), but the idea is mostly formed in my head.
I'd be happy to contribute ideas and/or code to implement such a beast.
(darren)
--
DISCLAIMER:
Use of this advanced computing technology does not imply
an endorsement of Western industrial civilization.
pgp00000.pgp
Description: PGP signature
