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

  • SEARCH
  • Home
  • 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 8292983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T13:40:39+00:00 2026-06-08T13:40:39+00:00

I am using mechanize to deal with a form . I have parsed the

  • 0

I am using mechanize to deal with a form . I have parsed the form using mechanize and the output comes is as follows:

{forms
 #<Mechanize::Form
 {name nil}
 {method "POST"}
 {action "/dashboard/checks/50114dbeae6f61b428000ad8"}
 {fields
  [hidden:0x60c476a type: hidden name: _method value: put]
  [text:0x60c4616 type: text name: check[name] value: Testing]
  [text:0x60c4512 type: text name: check[url] value: http://www.pintile.com]
  [text:0x60c445e type: text name: check[interval] value: 120]
  [text:0x60c435a type: text name: check[maxTime] value: 1500]
  [textarea:0x60c4116 type:  name: check[tags] value: ]}
 {radiobuttons}
 {checkboxes}
 {file_uploads}
 {buttons
  [button:0x60c3d88 type: submit name:  value: ]
  [button:0x60c3d24 type: submit name: delete value: ]

There are 2 buttons in this form
Save Changes(1st), Delete(2nd),
I use the following code to save the changes and it works fine:

form.field_with(:name => "check[name]").value = "Testing"
button = form.buttons.first
agent.submit(form, button)

The changes are saved successfully. But when i try to delete using the code below it does not work:

button = form.buttons.first
agent.submit(form, button)

It does nothing. Please help me out to get over with this issue.

  • 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-08T13:40:40+00:00Added an answer on June 8, 2026 at 1:40 pm

    If the website is a typical rails form, the delete button is most likely a JavaScript action. Mechanize does not support JavaScript. You may want to use something like capybara with the web kit driver instead, which has full JavaScript support and all of the functionality you already have in mechanize.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to login using the library Mechanize. This the output i get
When using mechanize to change the state of an item in a form, I
I'm trying to dynamically fill a form in Python using Mechanize. However, when I
I'm using Mechanize to fill out a form. Part of this form is dynamic.
I'm using mechanize to fill form on a website and now I run into
i'm using mechanize to submit a form like this... import mechanize br = mechanize.Browser()
I'm using mechanize to fill out a form that has a series of rows.
Currently I'm using Mechanize and the get() method to get each site, and check
I have been using Mechanize::Firefox in order to do some web scraping and I
Im using mechanize to parse http://www.hammacher.com/Category/Default.aspx?uq=Gifts-Under-30&all=True What xpath can I use to get to

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.