On Dec 15 Jim Martinez wrote: > On Dec 13 Andy Lester wrote: > > > I'm glad to see you usin' Mech for testing. My two favorite hats: > > Testing and Mech! > > Trying to wear those two hats, I replaced the <SELECT ... > multiple='multiple'> with checkboxes and had problems. > > > Yes, that is a shortcoming of Mech. I'm going to try to fix it this > > weekend.
I left the <SELECT multiple="multiple"> and when to checkboxes. The checkbox problem was not really a problem. I just was mixing Test::More and WWW::Mechanize incorrectly. A sample of what I tried (that didn't work): ok($a->tick(city => '109'), "set city to 109"); # always not ok ok($a->click('submit'),"click the done button"); what works: $a->tick(city => '109'); # and many other ticks done here ok($a->click('submit'),"click the done button"); In other words, the ->tick shouldn't be inside of ok. Instead I now do all the ->ticks that I want (with no ok) and then do an ok on the ->click method. > So I ran the tick.t script that comes with WWW::Mechanize which had > problems, claiming there is nor form number 1, but I see one in the > tick.html file. I think that was just an environment problem, and my escapist mind trying to figure out what was wrong. The tick.t works fine when I run a "make test" WWW::Mechanize is working out just fine. > [EMAIL PROTECTED] t]$ perl tick.t > 1..6 > ok 1 - use WWW::Mechanize; > ok 2 - The object isa WWW::Mechanize > ok 3 - URI shouldn't be an object > not ok 4 - file:/home/jjm/.cpan/build/WWW-Mechanize-0.70/t/t/tick.html > # Failed test (tick.t at line 15) > There is no form numbered 1 at tick.t line 17 > Can't call method "find_input" on an undefined value at > /usr/lib/perl5/site_perl/5.6.1/WWW/Mechanize.pm line 597. > # Looks like you planned 6 tests but only ran 4. > # Looks like your test died just after 4. Jim