in reply to Re^3: Not able to select the form with WWW::Mechanize::Firefox using form_with_fields()
in thread Not able to select the form with WWW::Mechanize::Firefox using form_with_fields()

The given HTML form does not have a formId or form Name. Hence I cannot use any of those. And with form_number it returned "Current form:4 elements found for form number 1". Hence I am really blocked due to this issue.
  • Comment on Re^4: Not able to select the form with WWW::Mechanize::Firefox using form_with_fields()

Replies are listed 'Best First'.
Re^5: Not able to select the form with WWW::Mechanize::Firefox using form_with_fields()
by Anonymous Monk on Jun 28, 2011 at 12:53 UTC

    The given HTML form does not have a formId or form Name. Hence I cannot use any of those. And with form_number it returned "Current form:4 elements found for form number 1". Hence I am really blocked due to this issue.

    I don't understand how you are blocked. How is form_number not working for you?

      There are 4 forms in the web page. When trying to select the first form, it shows that there are 4 elements with form number 1. Also when trying to select forms 2, 3 or 4, it gives error.

      This issue might be because of poorly written webpage. Since I have no control over this, I cannot select this form.

      But while using WWW::Mechanize, I am able to select any forms with the form number. Also I am able to do successful submission. Since some other forms use java script, I am not using this module. I just wanted to avoid clutter by using both modules in the same script.

        When trying to select the first form, it shows that there are 4 elements with form number 1.

        Before you quoted "Current form:4 elements found for form number 1"., this is not an error message

        Also when trying to select forms 2, 3 or 4, it gives error.

        What error?