WWW::Mechanize Fun

I have been writing a test suite for a website recently and came upon the following error.

Illegal value ‘GBR’ for field ‘country_iso’ at /usr/local/share/perl/5.8.4/WWW/Mechanize.pm line 1232

This seemed strange to me at first but when I thought about it I was using the following code

$mech->select(“country_iso”, ‘GBR’ );

If the value i.e. “GBR” in my case is not a valid select option then obviously WWW::Mechanize or rather HTML::Form will throw an error. It was actually HTML::Form::ListInput that the error came from but this is a package declared in the HTML/Form.pm module.

Leave a Reply

Your email address will not be published. Required fields are marked *