Thanks again for all that, bliako.

I don't really need to do a screen shot.  That was just an attempt at an easy way to see what had happened.

I tried your code, and its timing seems to work, thank you!  So that's the timing sorted.

However, I still have problems:
- If I try to login with a dummy email/password (as we've used above), I should get the error message "Email or password not found."...etc, but I don't.  The screen shot shows "Please try again later."..etc, with the email address selected (i.e. blue background).
- If I try to login with a valid email/password, I get the same result as the dummy email/password gives.  It should be logging in and taking me to "https://profile.ccli.com/".
- This "Please try again later."..etc, is the same message I get when I manually try to login with valid or invalid email/password when I have JavaScript disabled in Firefox.

Any ideas what's causing the above problems and how I can resolve them?

Re using Mechanize for scraping, I used to use WWW::Mechanize (not WWW::Mechanize::PhantomJS) for logging in to this same site, and I used Firefox's dev tools to grap the POST info to do that, but last year they changed the site and I couldn't see how to get that working anymore (perhaps just my lack of understanding), and they seemed to be requiring JavaScript, so I installed phantomjs and WWW::Mechanize::PhantomJS.  If I manually go to the site with Firefox with JavaScript disabled, there's a message at the top "JavaScript is disabled. Please enable to use the site.".  Can I ignore that message when it comes to my code, or do you think they might be blocking non-JavaScript agents?

(BTW, here's a shorter URL that I've just realised we can use for this: https://profile.ccli.com/Account/SignIn).


In reply to Re^4: WWW::Mechanize::PhantomJS can't click button by tel2
in thread WWW::Mechanize::PhantomJS can't click button by tel2

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.