Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: WWW::Mechanize click_button() not working in AIX

by onelesd (Pilgrim)
on Jul 10, 2012 at 21:01 UTC ( [id://980944]=note: print w/replies, xml ) Need Help??


in reply to Re^2: WWW::Mechanize click_button() not working in AIX
in thread WWW::Mechanize click_button() not working in AIX

Have you compared the perl/module versions like Corion suggested?
  • Comment on Re^3: WWW::Mechanize click_button() not working in AIX

Replies are listed 'Best First'.
Re^4: WWW::Mechanize click_button() not working in AIX
by perl_monster (Novice) on Jul 10, 2012 at 21:31 UTC

    The WWW::Mechanize version in both the machines is 1.54 (latest) they were installed on the same day on the Win machine and AIX machine. The Perl version in Win machine is 5.10.1 and AIX version of perl is 5.8.8, I am not sure if that should make any difference. Also, I am thinking if this is problem due to "Https". I am wondering if I need Net::SSLeay.

      LWP::UserAgent which WWW::Mechanize inherits from takes care of SSL for you.

      Have you tried $mech->find_all_submits( ... criteria ... ) and debugging that to make sure the button is recognized?

        WWW::Mechanize is a subclass of LWP::UserAgent, so this should work:

        $mech->add_handler("request_send", sub { shift->dump; return }); $mech->add_handler("response_done", sub { shift->dump; return });

        After that, do you see the request after you click_button()?

        I have used the below which is somewhat similar to what you mentioned

        my $inputobject=$mech->current_form()->find_input( undef,'submit' ); print $inputobject->value . "\n"; $mech->click_button(input => $inputobject); print $mech->status() . "\n";

        The $inputobject shows the correct button element as in the HTML source and the second print returns a status of 200 which apparently stands for OK. All of this still doesn't work, can't even see any errors anywhere. I attempted including LWP::Debug qw(+); in the code, but its not returning me any logging info either

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://980944]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-19 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found