By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,246 Members | 1,221 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,246 IT Pros & Developers. It's quick & easy.

Can't call method "tagName" on an undefined valuel/lib/Win32/IEAutomation.pm line 488

P: 4
hi i'm trying to use Win32::IEAutomation 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

Expand|Select|Wrap|Line Numbers
  1. use Win32::IEAutomation;
  2. my $mainPageURL = "https://www.clickbank.com/login.htm";
  3. my $ie = Win32::IEAutomation->new(visible=>0 , maximize => 1, warnings => 1 );
  4. $ie->gotoURL($mainPageURL);
  5. $ie->WaitforDone;
  6. $ie->getTextBox('name:',"nick")->SetValue("tgkprog2");
  7. $ie->getTextBox('name:',"pass")->SetValue("LFWLQ8XX");
  8. $ie->getButton('name:',"login")->Click();
  9. $ie->WaitforDone;
  10. my $mainMenuPage;
  11. my $stmtsPage;
  12. my $txnsPage;
  13. if($ie->URL() eq "https://www.clickbank.com/account/mainMenu.htm"){
  14.    $mainMenuPage = $ie->Content;
  15.    $ie->gotoURL("https://www.clickbank.com/account/showTransactions.htm");
  16.    $ie->WaitforDone;
  17.    if($ie->URL() eq "https://www.clickbank.com/account/showTransactions.htm"){
  18.     open FH, '>c:\\tmp\\a.txt' or die $!;
  19.     #flock FH, LOCK_EX or die $!;
  20.     print FH $ie->Content() or die $!;
  21.     close FH or die $!;   
  22.      $txsPage = $ie->Content;
  23.      print STDERR "at 33aftertext: Start\n ";
  24.      my $txt1 = $ie->getTextBox('aftertext:',"Start:");
  25.      print STDERR "at 34 got obj  \n";
  26.      print STDERR $txt1 ;
  27.      print STDERR "\n is null " ;
  28.      print STDERR $txt1 == null ;
  29.      print STDERR " right  " ;
  30.      $ie->getTextBox('aftertext:',"Start")->SetValue("2008-02-01");
  31.      $ie->getTextBox('name:',"endDate")->SetValue("2008-02-05");
  32.      $ie->getButton('value:',"Go")->Click();
  33.  
  34.  
  35.    }  
  36. }   
  37.  
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('aftertext:',"Start:");

[/PHP]
Mar 4 '08 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.