I am using the WWW::Mechanize module to automate a login/interaction with a website. I have a section of code that is to be executed on each page that I navigate through.
On one of the first pages, I enter a PIN and click a "continue" button. That takes me to a screen that says "verifying PIN", which then automatically redirects to the next page that accepts user input.
The problem I am having is that I don't know how to tell my script to "wait" for the PIN verification page to redirect me to the next page that requires user input. Consequently, my script is trying to enter data on the "verifying PIN" page that should actually be entered on the next page.
How can I tell my script to wait for the verification page to redirect to the next page that requires user input?
UPDATE: I navigated through the page using Firefox with javascript disabled and the redirection still went through properly, so javascript does not seem to be required to make the redirect occur, meaning I should be able to use WWW::Mechanize, correct?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.