in reply to Re^6: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? (update)
in thread How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing?
OK, so I think that's the problem. I added print $_->{message},"\n" for $mech->js_errors(); to my code, and I'm getting a mess of TypeError: undefined is not a function (evaluating ...) JavaScript errors that I don't see in any major web browser.Well, no such luck with that. Adding the polyfills to the main.js didn't seem to help at all. I give up!
How very disappointing. I guess I'll have to try to get WWW::Mechanize::Firefox working...
Or maybe I can inject some polyfills? Seems others have encountered this sort of problem with PhantomJS:
https://github.com/tom-james-watson/phantomjs-polyfill
https://github.com/mathiasbynens/String.prototype.startsWith
I might try that first... I'm thinking the best way to do that is to copy ghostdriver/src/main.js and add the polyfills to that?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing?
by LanX (Saint) on Aug 24, 2021 at 10:36 UTC | |
|
Re^8: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? (update)
by bliako (Abbot) on Aug 24, 2021 at 10:06 UTC |