in reply to Re: WWW::Mechanize click_button() not working in AIX
in thread WWW::Mechanize click_button() not working in AIX
Unfortunately, the only way I can target the button is to use the key/value pair I have used in the code. The HTML is a bit odd, but it belongs to a third party and I have little control over it. It looks like below (posting just the body portion of it which includes the logon form)-
<body> <h1>Account -- Log In</h1> <div id="content"> <form method="post"> <table id="login" cellpadding="0" cellspacing="0"> <tr> <th colspan="2" class="right">Log In</th> </tr> <tr> <td class="label">Username:</td> <td class="right"> <input type="text" name="login" value="" size="15" +/> </td> </tr> <tr> <td class="label">Password:</td> <td class="right"> <input type="password" name="passwd" size="15"/> </td> </tr> <tr> <th colspan="2" class="last"> <input type="submit" value="Login now"/> </th> </tr> </table> <input type="hidden" name="action" value="login"/> </form> <a href="/">Speed Fulfillment & Call Center Home</a> </div> </body>
as you can see that the button is actually a form submit element. So having said this, i have also tried $mech->submit() , but it did not work either.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: WWW::Mechanize click_button() not working in AIX
by onelesd (Pilgrim) on Jul 10, 2012 at 21:01 UTC | |
by perl_monster (Novice) on Jul 10, 2012 at 21:31 UTC | |
by onelesd (Pilgrim) on Jul 10, 2012 at 21:45 UTC | |
by onelesd (Pilgrim) on Jul 10, 2012 at 23:07 UTC | |
by perl_monster (Novice) on Jul 11, 2012 at 00:09 UTC | |
| |
by perl_monster (Novice) on Jul 10, 2012 at 22:02 UTC |