sub ClickCheckBox { #$ItemName
Description: Clicks on a Check
Box.
How To:
Find the check box name in your html with View Source:
Example:
<B>Specify your music preferences (check all that
apply):</B>
<BR><INPUT TYPE="checkbox" NAME="musicpref_rnb" CHECKED>
R&B
<BR><INPUT TYPE="checkbox" NAME="musicpref_jazz" CHECKED>
Jazz
<BR><INPUT TYPE="checkbox" NAME="musicpref_blues" CHECKED>
Blues
<BR><INPUT TYPE="checkbox" NAME="musicpref_newage"
CHECKED> New Age
If you want to click on the Jazz
checkbox
ClickCheckBox("musicpref_jazz");
Cookbook recipe
use Win32::OLE; use Win32::SAM; #use Win32::Slingshot;
$| = 1; my $URL = "http://samie.sourceforge.net/Checkbox.html"; my $seconds;
$Win32::OLE::Warn = 3;
StartIE(); $seconds = Navigate($URL); print "Checkbox.html page took $seconds seconds to load\n"; ClickCheckBox("bike");