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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |