$agent->tick($chk_visa,'Visa'); #### use CGI::Pretty qw(:standard); if (param('chklstCC:0')) { print header, param('chklstCC:0'); } else { print header,start_html,start_form, checkbox_group( -name=>'chklstCC:0', -values=>[qw(Visa MasterCard Discover)], ), submit('go'), end_form, end_html, ; } #### use WWW::Mechanize; use Test::More qw(no_plan); my $bot = WWW::Mechanize->new(); $bot->get('http://localhost/path/to/cgi_script.cgi'); $bot->tick('chklstCC:0','Visa'); $bot->submit; is( $bot->content(), 'Visa', "Got expected content" );