Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

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/ 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?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (4)
As of 2021-12-09 00:51 GMT
Find Nodes?
    Voting Booth?
    R or B?

    Results (36 votes). Check out past polls.