Class Mechanize::Form::Field
In: lib/mechanize/form/field.rb
Parent: Object

This class represents a field in a form. It handles the following input tags found in a form:

  • text
  • password
  • hidden
  • int
  • textarea
  • keygen

To set the value of a field, just use the value method:

  field.value = "foo"

Methods

<=>   dom_class   dom_id   new   query_value  

Attributes

name  [RW] 
node  [RW] 
type  [RW] 
value  [RW] 

Public Class methods

Public Instance methods

This method is a shortcut to get field‘s DOM id. Common usage: form.field_with(:dom_class => "foo")

This method is a shortcut to get field‘s DOM id. Common usage: form.field_with(:dom_id => "foo")

[Validate]