I am developing a Rails application and I am using mechanize to automate the changing of a profile. Currently I am trying to change a field date that has some sort of mask, as it only displays the format. (dd/mm/yyyy). It has two fields: Birth_Date_Visible, text input, and Birth_Date, hidden_field. I cannot change the hidden field as doing so and submitting the form raises me a 500 server error: unhandled response.
Any ideas on how to do that?
The problem may be that you didn't change hidden control readonly attr.
From Mechanize FAQ:
How do I change INPUT TYPE=HIDDEN field values (for example, to emulate the effect of JavaScript code)? As with any control, set the control’s readonly attribute false.