Scott Lanning > Mozilla-Mechanize-0.06 > Mozilla::Mechanize::Input

Download:
Mozilla-Mechanize-0.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

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

SYNOPSIS ^

sorry, read the source for now

DESCRIPTION ^

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

METHODS ^

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

Initialize a new object. $input_node is a 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 ^

Copyright 2005,2009 Scott Lanning <slanning@cpan.org>. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

syntax highlighting: