images/littlesamie.jpg (853 bytes)

sub SetEditBox {#$name, $value, [$action, $formname]

Description: Enters text into an edit box

How To:

Find the input type="text" name in your html with View Source:

Cookbook Example:

use Win32::OLE;
use Win32::SAM;
#use Win32::Slingshot;

$| = 1;
my $URL = "http://samie.sf.net/simpleform.html";
my $seconds;

$Win32::OLE::Warn = 3;

StartIE();
$seconds = Navigate($URL);
print "simpleform.html page took $seconds seconds to load\n";
SetEditBox("name","samie");
SetEditBox("age","about 2 years old now");
$seconds = ClickFormButton("infotest");
print "Answer Page took $seconds seconds to load\n";
Further Notes:

The first parameter $name tells samie what Edit Box name to look for.
The second parameter $value tells samie what to set the edit box to.
The third parameter $action is optional and tells samie what javascript action to fire if that is necessary
The fourth parameter $formname is also optional and tells samie what form to look in, in case you have two edit boxes with the same name on the same page.

images/littlesamie.jpg (853 bytes)