Today I experimented with using YAML to help with. YAML is more human friendly for data entry in that it doesn't usually need quoting, and the end-of-line-comma can be omitted.
Here's how I got two great tastes to test great together:
use YAML::Syck;
$mech->submit_form(
fields => Load(q{
first_name : Mark
last_name : Stosberg
street_address : 211 NW I ST
#... lots more data...
}));
I further sped-up the process by using the 'mech-dump' give me the field names in the first place, which I copied in here. (This step only helps if you are sure you have the right fields on the form in the first place!).
With a little work, mech-dump could output YAML directly, making for a smooth round-trip workflow.
Using YAML to speed up creating WWW::Mechanize test scripts 0 Comments More | Login | Reply /