Class | WWW::Mechanize::GlobalForm |
In: |
lib/mechanize/form.rb
|
Parent: | Object |
GlobalForm provides all access to form fields, such as the buttons, check boxes, and text input.
GlobalForm takes two nodes, the node where the form tag is located (form_node), and another node, from which to start looking for form elements (elements_node) like buttons and the like. For class Form both fall together into one and the same node.
Class Form does not work in the case there is some invalid (unbalanced) html involved, such as:
<td> <form> </td> <td> <input .../> </form> </td>
fields | -> | elements |
action | [RW] | |
buttons | [R] | |
checkboxes | [R] | |
elements_node | [R] | |
enctype | [R] | |
fields | [R] | |
file_uploads | [R] | |
form_node | [R] | |
method | [RW] | |
name | [RW] | |
radiobuttons | [R] |
This method adds a button to the query. If the form needs to be submitted with multiple buttons, pass each button to this method.
This method builds an array of arrays that represent the query parameters to be used with this form. The return value can then be used to create a query string for this form.