You keep asking the same question again and again (Is it possible to get the application messages What could be the best way to capture controls in a web page?). If you actually provided more information, such as the URL of the login page that you are trying to process, that would help us in helping you.

As others have said, the process of submitting user name and password is first triggered by the submit button attached to the form of the document. You have to examine the action of the submission form to figure out what happens next. It could be a Perl script, a PHP script, a shell script, an ASP process, or something else I'm not thinking of at the moment. If you don't control the source of the scripts that do the processing, you are limited in what you can do to try to automate the process.

Most importantly, what does "validate the error condition in this case" mean to you? The simplest way to handle the situation is to use WWW::Mechanize to submit the form information, collect the resulting HTML sent back from the server into a Perl variable, and look for the string "Incorrect user name/password"


In reply to Re: Error Validation by Sinistral
in thread Error Validation by anbutechie

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.