I have to apologize - you reported this problem as a bug in WWW::Mechanize::Chrome and I rejected that bug because I could not reproduce it. But it is an actual bug. With your posted code above, I can easily reproduce the issue and the problem is that the code does not cope with a Page.navigatedWithinDocument element at all.
I've added the following code to WWW::Mechanize::Chrome, which should fix that issue, or at least not crash anymore:
} elsif ( my $res = $events{ 'Network.responseReceived' }) { #warn "Network.responseReceived"; $response = $self->httpResponseFromChromeResponse( $res ) +; $response->request( $request ); + } elsif ( my $res = $events{ 'Page.navigatedWithinDocument' }) { + # A fake response, just in case anybody checks + $response = HTTP::Response->new( + 200, # is 0 for files?! + "OK", + HTTP::Headers->new(), + ); + $response->request( $request );
A new version of WWW::Mechanize::Chrome is just testing and then on its way onto CPAN.
In reply to Re: Unable to automate login to Twitter with WWW::Mechanize::Chrome
by Corion
in thread Unable to automate login to Twitter with WWW::Mechanize::Chrome
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |