473,465 Members | 1,945 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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

4 New Member
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
0 2196

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

Similar topics

3
by: Ante Perkovic | last post by:
Hi, Sorry if this is OT :( I have some old CSS files that have all class names preceded with tagname, like "TD.verysmall" or "span.important". I'm exeprimenting with Dreamwiever and I noticed...
10
by: ST | last post by:
Hi, I'm new to vb.net programming, and I keep getting this error: Name 'GetQuery' is not declared. I can't figure out why?? It seems like I have the right references/namespaces. This is my code...
2
by: VB Programmer | last post by:
I created a simple user control and placed it on another page. Often I get this error: "Could not reformat the document due to line 27. The original format was restored." Line 27 in the...
6
by: Dariusz Tomon | last post by:
Hi How can I get url of page so taht I can pass it to string varaible. I have got several urls in my IIS under one folder. I want to have one default.aspx where code under it recognize which...
7
by: Xh | last post by:
Hi All, I have problems with generating valid HTML output there are few HTML elements that i don't what to output as <tagname/> but as <tagname></tagnamebut Xalan keeps generating them as...
3
by: Aaron | last post by:
I'm trying to parse a table on a webpage to pull down some data I need. The page is based off of information entered into a form. when you submit the data from the form it displays a...
7
by: Zhang Weiwu | last post by:
Dear all How does javascript realiablily tell if a variable is a reference to an HTML Element "<select>", without causing browser to pop up error message? if (variable.constructor ==...
1
by: yoni12ab | last post by:
Hi Im new in my job never configure iis the problem is that I reinstalled visual studio 2003 becouse of debugger problem and the local web site was working fine and now it doesent work it giving...
1
by: Beamor | last post by:
function art_menu_xml_parcer($content, $showSubMenus) { $doc = new DOMDocument(); $doc->loadXML($content);//this is the line in question $parent = $doc->documentElement; $elements =...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.