Take the 2-minute tour ×  the code that didn't work:  login_form
= page.form_with(:method => 'post')  and code that works
login_form = page.form_with(:method => 'POST')  I inspected the
form object via puts page.forms.inspect and got   {name nil}
{method "POST"}  html source:  <form class="login"
method="post"> <fieldset> <legend>Members Login</legend>
<label for="auth_username">Username</label> <input
id="auth_username" name="auth_username">  <label
for="auth_password">Password</label> <input id="auth_password"
name="auth_password" type="password">  <div class="buttons">
<input name="auth_login" type="submit" value="Login"><p
class="note"><a href="/forgotpassword">Forgot your
password?</a></p>   share|improve this question add comment  1
Answer  up vote 1 down vote accepted  Looking at the source, it
could be that Mechanize is supposed to work like that. It forces
the form method to uppercase when it fetches the form; you are
expected to supply the method in uppercase when you want to
match it. You might