473,326 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Can't call method "value" on an undefined value error after perl script is run

If I run the below program . I get the following error message
Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.

Please let me know your inputs on the same


#!c:\perl\bin\perl.exe

use strict;
use WWW::Mechanize;
use HTTP::Cookies;
use LWP::debug qw(+);
use Win32::IE::Mechanize;

my $outfile = "out.htm";
my $url = "http://www.mindsrc.com/index.php?id=careers_submit";

my $mech= Win32::IE::Mechanize->new();
$mech->get($url);

sleep 10;

$mech->form_name("subapp");

my $f = "14232";
my $l = "6847";

sleep 5 ;
$mech->field(first => $f);

$mech->click();

#use LWP::debug qw(+);

my $output_page = $mech->content;


open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
print $output_page;

close(OUTFILE);


Kindly guide me how can I get over this issue.

Mithun
Mar 19 '08 #1
1 5107
Hello All,

just to be more clear . I am trying to fill up the fields of the website and want to do a submit from the script.
But I get the following error

Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.





If I run the below program . I get the following error message
Can't call method "value" on an undefined value at C:/Perl/site/lib/Win32/IE/Mec
hanize.pm line 900.

Please let me know your inputs on the same


#!c:\perl\bin\perl.exe

use strict;
use WWW::Mechanize;
use HTTP::Cookies;
use LWP::debug qw(+);
use Win32::IE::Mechanize;

my $outfile = "out.htm";
my $url = "http://www.mindsrc.com/index.php?id=careers_submit";

my $mech= Win32::IE::Mechanize->new();
$mech->get($url);

sleep 10;

$mech->form_name("subapp");

my $f = "14232";
my $l = "6847";

sleep 5 ;
$mech->field(first => $f);

$mech->click();

#use LWP::debug qw(+);

my $output_page = $mech->content;


open(OUTFILE, ">$outfile");
print OUTFILE "$output_page";
print $output_page;

close(OUTFILE);


Kindly guide me how can I get over this issue.

Mithun
Mar 19 '08 #2

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

Similar topics

0
by: Gene Mat | last post by:
Hi, I'm trying to build a simple Perl program to get a list of newsgroups. Here's what I have... #!/opt/local/bin/perl use Net::NNTP; $nntp = Net::NNTP->new("nntp.perl.org",Debug,10);...
2
by: gmccammon | last post by:
I am getting an error that says that I can't call method "prepare" on an undefined value! Here is what I have as code.... I don't understand what is not defined. # opens connection to Access...
23
by: ticfranca | last post by:
Hi, I'm getting this error in the code below: sub Pega_recorde { $database = 'bundinha'; $host = 'localhost'; $usuario = 'myhumoradm'; $senha = 'my8xr2d2'; ...
1
by: jabdulius | last post by:
Hi all, newb to Perl here. I'm trying to use the Net:SNPP package to send a page, and getting the above error when trying to send. Here's my code: my $host = "snpp.cingular.com:444"; my $snpp =...
11
by: gautamga | last post by:
Hi All i have created the script which calls method from other script lib and while executing i get and error Can't call method "prepare" on an undefined value at...
1
by: satish2112 | last post by:
Hi, I have a text-area which contains values from mysql database and 2 buttons, Edit and Update. When I click on the Edit button, I can edit the text-area (initially non-editable). After this,...
0
by: tgkprog | last post by:
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...
2
by: mithunmo | last post by:
I am trying to automate the process of filling up the webforms and do a submit . I have the below program written but If I run the program . I get the following error message Can't call method...
4
by: Jonathan | last post by:
I have a SQL stored procedure for adding a new record in a transactions table. It also has two return values: CounterID and IDKey. I want to create a webservice that accepts the 10 input...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.