so you need do the js part manually.
Thanks
2009/11/5 perlw01f <p3r1w01f@gmail.com>:
>
> Yes, thanks
> now change the $url= 'http://www7.i.demo.com/cgi-bin/cgi-bin/home'',
> no errors, but result shows login failed even I add header in $mech
>
> On Nov 5, 8:42 pm, Fayland Lam <fayl...@gmail.com> wrote:
>> before you see the login form, you visit which URL first?
>>
>> try $mech->get('that_url'); # not the POST login URL
>>
>> treat the $mech as a browser, get is open an URL
>> submit_form is to submit a form.
>> you must open a URL then you have form to submit.
>>
>> Thanks
>>
>> 2009/11/5 perlw01f <p3r1w...@gmail.com>:
>>
>>
>>
>>
>>
>>
>>
>> > Yes, something errors happen when get|post,
>> > <title>DEMO :: Error</title>
>>
>> > for get, msgWindow.document.write('<p><strong>Unsupported method</
>> > strong></p>');
>> > for post, msgWindow.document.write('<p><strong>You must enter your
>> > UserName and Password</strong></p>');
>>
>> > confused...
>> > Thanks
>> > On Nov 5, 8:10 pm, Fayland Lam <fayl...@gmail.com> wrote:
>> >> try
>>
>> >> my $resp = $mech->get($url);
>> >> print $resp->content;
>>
>> >> see if the content has the Logon form inside.
>>
>> >> Thanks
>>
>> >> 2009/11/5 perlw01f <p3r1w...@gmail.com>:
>>
>> >> > Thanks
>> >> > But the same error turns out.
>>
>> >> > On Nov 5, 8:03 pm, Fayland Lam <fayl...@gmail.com> wrote:
>> >> >> you need
>>
>> >> >> $mech->get($url) first
>> >> >> then try form_name
>>
>> >> --
>> >> Fayland Lam //http://www.fayland.org/
>>
>> --
>> Fayland Lam //http://www.fayland.org/
> >
>
--
Fayland Lam // http://www.fayland.org/
--~--~---------~--~----~------------~-------~--~----~
您收到此信息是由于您订阅了 Google 论坛"PerlChina Mongers 讨论组"论坛。
要在此论坛发帖,请发电子邮件到 perlchina@googlegroups.com
要退订此论坛,请发邮件至 perlchina+unsubscribe@googlegroups.com
更多选项,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问该论坛
-~----------~----~----~----~------~----~------~--~---
没有评论:
发表评论