[Catalyst] Automated testing of Captcha?
Yves Räber
yraber at mailup.net
Tue Jan 22 05:27:01 GMT 2008
The captcha value can be accessed here : $c->captcha_string
>From the CPAN Documentation :
http://search.cpan.org/dist/Catalyst-Plugin-Captcha/lib/Catalyst/Plugin/Captcha.pm
#validate with CP::FormValidator::Simple
sub do_post : Local {
my ($self, $c) = @_;
$c->form(
validate => [['EQUAL_TO',$c->captcha_string]]
)
}
On Mon, 2008-01-21 at 14:19 -0700, Christopher Dorman wrote:
> I am using T::W::M::C to test a page that has a (required) Captcha
> field. In order for it to pass validation, the correct value needs to
> be passed in.
>
> Is it possible to grab the "correct" captcha value in the test script so
> that validation can succeed, or do we need to set some environment
> variable that we check in the validation to give the field a pass? What
> does everyone else do?
>
> Chris
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/
More information about the Catalyst
mailing list