sub logtofile {#$message, $type
Description: Lets you log your samie
output to a text file named test.log.
How To:
Call the subroutine logtofile inside your samie scripts.
Examples:
logtofile("Hello Samie")
logtofile("Hello Samie","write")
logtofile("Hello Samie","append")
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"; logtofile("This is a test\n","write"); logtofile("Checkbox.html page took $seconds seconds to load\n"); ClickCheckBox("bike");
Further Notes:
The optional $type parameter has two options:
1) "write" tells samie to delete the test.log file before writing to it.
2) "append" tells samie to add to the test.log file.
If the $type parameter is omitted, samie defaults to "append".