Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Need Help in WWW::Mechanize module

by Anonymous Monk
on Nov 05, 2009 at 09:44 UTC ( #805214=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am using this module to fetch the web pages. At one stage I struggled to get the form details which is there inside the tag.

How can I get it?

My actual requirement is to click the button inside the form. But the form is inside the table. When I was using forms() method it returns empty array. I also tried with click_button() method this tells an error as "Can't call method "click" on an undefined value at /usr/share/perl5/WWW/Mechanize.pm line 1403".

Replies are listed 'Best First'.
Re: Need Help in WWW::Mechanize module
by marto (Cardinal) on Nov 05, 2009 at 10:21 UTC
Re: Need Help in WWW::Mechanize module
by redgreen (Priest) on Nov 05, 2009 at 14:17 UTC

    Try using mech-dump to debug the form. It will show you what forms are available and what data they expect.

    If mech-dump doesn't see any forms, then you might have to view the page source. It is possible the form is built with javascript, which isn't handled by mech.

Re: Need Help in WWW::Mechanize module
by Anonymous Monk on Nov 06, 2009 at 09:05 UTC

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2021-08-05 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My primary motivation for participating at PerlMonks is: (Choices in context)








    Results (44 votes). Check out past polls.

    Notices?