little samie

sub ClickRadioButton { #$radioName, $radioValue

Description: Clicks on a Radio Button

How To:

Find the radio button name in your html with View Source:

Example:

<B>My Favorite number is:</B>
<BR><INPUT TYPE="radio" NAME="button" value="value1">one<br>
<BR><INPUT TYPE="radio" NAME="button" value="value2">two<br>
<BR><INPUT TYPE="radio" NAME="button" value="value3">three<br>
<BR><INPUT TYPE="radio" NAME="button" value="value4">four

If you want to click on the two radio button

ClickRadioButton("button",1);

Cookbook recipe

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

$| = 1;
my $URL = "http://samie.sourceforge.net/RadioButton.html";
my $seconds;
$Win32::OLE::Warn = 3;

StartIE();
$seconds = Navigate($URL);
print "RadioButton.html page took $seconds seconds to load\n";
ClickRadioButton("button",1);

little samie