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

already posted this but i just cant find my post :/ anyway can someone show me how to get the content of input boxes on a webpage, i've tried:
my @find_text = $mech->find_all_inputs( type => 'text' ); for $boxes (@find_text) { print $boxes->content; }
my @find_text = $mech->find_all_inputs( type => 'text' ); for $boxes (@find_text) { print $boxes->gettext; }
my @find_text = $mech->find_all_inputs( type => 'text' ); for $boxes (@find_text) { print $boxes->value; }
none of these are working :/

Replies are listed 'Best First'.
Re: WWW::Mechanize problem
by Corion (Patriarch) on May 06, 2012 at 14:37 UTC

    How are they failing for you?

    What is (the relevant part of) your input HTML?

    What is the exact code you are using to find that "none of these are working"?

    Have you looked at HTML::Form?

    We try to help you, but if you give us more information, that helps us help you better.

    Also see WWW::Mechanize help, which may or may not be your original node. Also see Super Search and Newest Nodes to find nodes.

      How are they failing for you? No error warnings, result from print is blank. What is (the relevant part of) your input HTML? <INPUT type='text' values="over 100 random character string here"> Have you looked at HTML::Form? yep and the input box has no id or name anyway.

        So, does WWW::Mechanize->find_all_inputs find that link? Have you inspected your list of inputs? Does it find any other input fields? Is the HTML that WWW::Mechanize sees the HTML you expect?

        What is the exact code you are using to find that "none of these are working"? I am asking that question because it helps me to replicate your situation. Please post a short, self-contained example of no more than 20 lines that reproduces the problem.

Re: WWW::Mechanize problem
by choroba (Cardinal) on May 06, 2012 at 16:18 UTC
    already posted this but i just cant find my post :/
    Consider registering. With an account, you can just click on "Nodes you wrote" to see all the prudence you emitted.