Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733113
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:54:16+00:00 2026-06-01T06:54:16+00:00

I am having some difficulty with one of our service providers login forms. The

  • 0

I am having some difficulty with one of our service providers login forms. The other sites are working fine but for some reason I can’t get past their login form.

The website login for is like this:

<form accept-charset="UTF-8" action="/sessions" class="new_user_session" id="new_user_session" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="kaLEkPesQfeheronzGTdfnVAzpuUiC+VmjVXBu540n8=" /></div>

      <fieldset class="big">

      <div class="form-row">
        <div class="form-label">
        <label for="user_session_email">Email</label>
        </div>
        <div class="form-field">
        <input id="user_session_email" name="user_session[email]" size="30" type="text" />

        </div>

      </div>          

      <div class="form-row">
        <div class="form-label">
        <label for="user_session_password">Password</label>
        </div>
        <div class="form-field">
        <input id="user_session_password" name="user_session[password]" size="30" type="password" />

        </div>

        <div class="form-comment"><p><a href="/password_resets/new" class="link-password-recovery">Forgot your password?</a></p></div>
      </div>

        <div class="form-row optional">
          <div class="form-field">
            <label for="user_session_remember_me"><input name="user_session[remember_me]" type="hidden" value="0" /><input id="user_session_remember_me" name="user_session[remember_me]" type="checkbox" value="1" /> Remember me for 2 weeks</label>
          </div>

        </div>

</fieldset>  

I have tried to login using the same code as other the other sites but it doesn’t work.

# Create a new mechanize object
agent = Mechanize.new

# Load the dial9 website
page = agent.get("http://webapplication.co.uk")

# Select the first form
form = agent.page.forms.first
form.username = 'username
form.password = 'password'

# Submit the form
page = form.submit form.buttons.first

I have also tried a different way of logging in as suggested in other SO questions/answers:

email = 'user@domain.com'
password = 'password

# Create a new mechanize object
agent = Mechanize.new

# Load the postmarkapp website
page = agent.get("https://domain.com")

# Select the first form
form = agent.page.forms.first
form.field_with(:email => "user_session_email").value = email
form.field_with(:password => "user_session_password").value = password

# Submit the form
page = form.submit form.buttons.first

Using this method of authentication I get the following output when running the rake task:

undefined method `email' for [hidden:0x3fef2ab2b994 type: hidden name: utf8 value: ✓]:Mechanize::Form::Hidden

Upon closer inspection the above error seems to be due to the fact that there is a field immediately after the form is started:

<form accept-charset="UTF-8" action="/sessions" class="new_user_session" id="new_user_session" method="post"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="kaLEkPesQfeheronzGTdfnVAzpuUiC+VmjVXBu540n8=" /></div>

Am I missing something? If so, what? Any pointers are appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T06:54:18+00:00Added an answer on June 1, 2026 at 6:54 am

    Try changing

    form.field_with(:email => "user_session_email").value = email
    form.field_with(:password => "user_session_password").value = password
    

    to

    form.field_with(:name => "user_session[email]").value = email
    form.field_with(:name => "user_session[password]").value = password
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having some difficulty working with buttons and images. I have 2 buttons, one
I'm having some difficulty creating nested objects between a one-to-many relationship. My models are
I am developing initscripts for some of our software, and am having difficulty deciding
In one of my unit tests, I am having some difficulty getting a mocked
I'm having some difficulty wrapping my head around this one. I have two divs,
I know this question has been asked before, but I'm having some difficulty getting
I am having some difficulty in deploying my WCF service alongside my ASP.NET web
im having some difficulty trying to pull out a specific value from a cookie.
I am having some difficulty converting this list of strings into a list of
I am having some difficulty returning all the results I would expect when leaving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.