nysus has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to write a script that automates logging into Twitter with WWW::Mechanize::Chrome. The script fills out the user name name and password fields but when it tries to click the "Log in" button, an error is thrown and the browser immediately closes out. The error is:
Didn't see a 'Network.responseReceived' event for frameId CCFEFDAEDAF4 +F4BDFBD57DCF85C5B736, requestId 1000091631.28, cannot synthesize resp +onse at /Users/me/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24 +.4/WWW/Mechanize/Chrome.pm line 1852.
Here is the script:
#!/usr/bin/env perl use strict; use warnings; use WWW::Mechanize::Chrome; my $mech = WWW::Mechanize::Chrome->new(); $mech->get('http://twitter.com'); $mech->form_number(1); $mech->field('session[username_or_email]' => 'user'); $mech->field('session[password]' => 'password'); $mech->click({ selector => "form.LoginForm input.EdgeButton" });
I've tried different methods for submitting the form but with the same results.
$PM = "Perl Monk's";
$MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate Priest Vicar";
$nysus = $PM . ' ' . $MCF;
Click here if you love Perl Monks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Unable to automate login to Twitter with WWW::Mechanize::Chrome
by Corion (Patriarch) on Dec 23, 2018 at 12:55 UTC | |
by nysus (Parson) on Dec 23, 2018 at 15:26 UTC |