Mozilla::Mechanize::Input - A small class to interface with the Input objects


Mozilla-Mechanize documentation  | view source Contained in the Mozilla-Mechanize distribution.

Index


NAME

Top

Mozilla::Mechanize::Input - A small class to interface with the Input objects

SYNOPSIS

Top

sorry, read the source for now

DESCRIPTION

Top

The Mozilla::Mechanize::Input object is a thin wrapper around HTML input elements.

METHODS

Top

Mozilla::Mechanize::Input->new($input_node, $moz)

Initialize a new object. $input_node is a Mozilla::DOM::HTMLElement (Mozilla::DOM::HTMLElement) (or a node that can be QueryInterfaced to one); specifically, it must be an HTMLInputElement, an HTMLButtonElement, an HTMLSelectElement, or an HTMLTextAreaElement. $moz is a Mozilla::Mechanize object. (This latter is a hack for `click', so that new pages can load in the browser. The GUI has to be able to enter its main loop. If you don't plan to use that method, you don't have to pass it in.)

$input->name

Return the input-control name.

$input->type

Return the type of the input control. Note: for <select>, this returns 'select-one' for single select, and 'select-multiple' for multiple. (I don't know why.)

$input->value( [$value] )

Get/Set the value of the input control.

$input->select_value( [$value] )

Mark all options with $value as selected and unselect all other options.

$input->radio_value( [$value] )

Locate all radio-buttons with the same name within this form. Now uncheck all values that are not equal to $value.

$input->click

Calls the click() method on the actual object.

COPYRIGHT AND LICENSE

Top


Mozilla-Mechanize documentation  | view source Contained in the Mozilla-Mechanize distribution.