in reply to Re^3: using and debuging www Mechanize
in thread using and debuging www Mechanize

When i use ->dump_forms() after i ran the Submit_form i get:
ctl00$ctl00$cphServer$cphLogin$txtUser=someone (text) ctl00$ctl00$cphServer$cphLogin$txtPW= (password) ctl00$ctl00$cphServer$cphLogin$ddlServers=Live (option) [*Live|Tes +t] ctl00$ctl00$cphServer$cphLogin$btnSignIn=Sign-In (submit) ctl00$ctl00$cphServer$cphLogin$btnConfigure=Configure (submit)
And i see there are two Submit lines, how i can make sure submit_form is using the correct one?

Replies are listed 'Best First'.
Re^5: using and debuging www Mechanize
by Anonymous Monk on Jun 08, 2009 at 13:22 UTC
    What is the correct one? 2nd example from SYNOPSIS
    $mech->submit_form( form_name => 'search', fields => { query => 'pot of gold', }, button => 'Search Now' );
    So try
    submit_form( button => 'Sign-In', ...
      OK, i did that, but still i am not redirected to the next page. Is it possible there is something like a cookie or another protection that stops me from entering?
      How can i check for cookies and make sure i am valid?

      Thanx again for all your help!