[Chicago-talk] WWW::Mechanize question
James.Q.L
shijialeee at yahoo.com
Wed Feb 7 07:41:36 PST 2007
sorry replying myself.
I have found a solution. W::M is a subclass of LWP. so all i need to do is
$mech->post( $post_url,
[
field_1 => value,
fake_field => fake_value,
],
);
but still, i would like to know how to do that in mech if there is a way.
thanks.
Qiang
--- "James.Q.L" <shijialeee at yahoo.com> wrote:
> hello,
>
> long time LWP user. i am just start to use W::M and Test::W::M.
>
> in LWP, I can post to a form with any field i want. however, i can't find the method in W::M do
> that. the field and set_fields can only set the known form fields but complain when i am setting
> unknown fields.
>
> this is what i do in LWP.
> $response = $browser->post( $post_url,
> [
> field_1 => value,
> fake_field => fake_value,
> ],
> );
>
> do i need to use the overloaded request method to do that?
>
> also, it was not clear to me that when i am posting to a url, does all the hidden fields posted
> along with it as well? it seems that it does.
>
> thanks,
>
> Qiang
>
>
>
> ____________________________________________________________________________________
> Expecting? Get great news right away with email Auto-Check.
> Try the Yahoo! Mail Beta.
> http://advision.webevents.yahoo.com/mailbeta/newmail_tools.html
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>
____________________________________________________________________________________
Never Miss an Email
Stay connected with Yahoo! Mail on your mobile. Get started!
http://mobile.yahoo.com/services?promote=mail
More information about the Chicago-talk
mailing list