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


In reply to Unable to automate login to Twitter with WWW::Mechanize::Chrome by nysus

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.