hi i'm trying to use Win32::IEAutoma tion to automate clickbank.com navigation and page saving
i can login and go to the https://www.clickbank.com/account/showTransactions.htm
page but cannot get the startDate text control
this user id is for testing only
i get error
at 33aftertext: Start
Can't call method "tagName" on an undefined value at C:/aps/xampp4/perl/lib/Win32/IEAutomation.pm line 488.
so it cant even get a handle to the object
[PHP]
print STDERR "at 33aftertext: Start\n ";
my $txt1 = $ie->getTextBox('af tertext:',"Star t:");
[/PHP]
i can login and go to the https://www.clickbank.com/account/showTransactions.htm
page but cannot get the startDate text control
Code:
use Win32::IEAutomation;
my $mainPageURL = "https://www.clickbank.com/login.htm";
my $ie = Win32::IEAutomation->new(visible=>0 , maximize => 1, warnings => 1 );
$ie->gotoURL($mainPageURL);
$ie->WaitforDone;
$ie->getTextBox('name:',"nick")->SetValue("tgkprog2");
$ie->getTextBox('name:',"pass")->SetValue("LFWLQ8XX");
$ie->getButton('name:',"login")->Click();
$ie->WaitforDone;
my $mainMenuPage;
my $stmtsPage;
my $txnsPage;
if($ie->URL() eq "https://www.clickbank.com/account/mainMenu.htm"){
$mainMenuPage = $ie->Content;
$ie->gotoURL("https://www.clickbank.com/account/showTransactions.htm");
$ie->WaitforDone;
if($ie->URL() eq "https://www.clickbank.com/account/showTransactions.htm"){
open FH, '>c:\\tmp\\a.txt' or die $!;
#flock FH, LOCK_EX or die $!;
print FH $ie->Content() or die $!;
close FH or die $!;
$txsPage = $ie->Content;
print STDERR "at 33aftertext: Start\n ";
my $txt1 = $ie->getTextBox('aftertext:',"Start:");
print STDERR "at 34 got obj \n";
print STDERR $txt1 ;
print STDERR "\n is null " ;
print STDERR $txt1 == null ;
print STDERR " right " ;
$ie->getTextBox('aftertext:',"Start")->SetValue("2008-02-01");
$ie->getTextBox('name:',"endDate")->SetValue("2008-02-05");
$ie->getButton('value:',"Go")->Click();
}
}
i get error
at 33aftertext: Start
Can't call method "tagName" on an undefined value at C:/aps/xampp4/perl/lib/Win32/IEAutomation.pm line 488.
so it cant even get a handle to the object
[PHP]
print STDERR "at 33aftertext: Start\n ";
my $txt1 = $ie->getTextBox('af tertext:',"Star t:");
[/PHP]