On Aug 25, 2015, at 10:25 PM,
mcco...@molbio.mgh.harvard.edu wrote:
> click on a button to choose the option:
> $mech->click_button( name => "topLeft2Right");
>
> then click a submit button:
> $mech->click_button( name => "submit");
>
> Everything is successful up until the last click_button, using $mech->success() all returns are 1 after each step up to the submit button. However, I get an error:click_button: No form has been selected at line indicating where the $mech->click_button( name => "submit") command is located.
>
> Does the form change after clicking a button ?
->click_button() is a shorthand way of calling ->submit_form().
It looks like when you click that first button, it does some JavaScript. Mech doesn't know anything about JavaScript, so button actions that do JavaScript won't work in Mech.