little samie

Index   Next   Previous

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

$| = 1;
my $URL = "http://www.google.com/";
my $seconds;

$Win32::OLE::Warn = 3;

StartIE();
$seconds = Navigate($URL);
print "Google Page took $seconds seconds to load\n";
SetEditBox("q","Presidents");
$seconds = ClickFormButton("btnG");
print "Query Page took $seconds seconds to load\n";


Going through the code line by line...

SetEditBox("q","Presidents");

This code makes a call to the SetEditBox subroutine which in located in c:\per\site\lib\win32\SAM.pm

In HTML the edit box is defined with the <input> tag. Use the View Source command to see the html for any page.

The SetEditBox subroutine sets an edit box with a value or string.  The first parameter for SetEditBox uses the name element of the edit box.
Here is an example of a name element to an edit box: 

<input name="login" size="17" value="">

The Second parameter is the value you would like to set the edit box to.

Index   Next   Previous

little samie