Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
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.

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?
Well, no such luck with that. Adding the polyfills to the main.js didn't seem to help at all. I give up!

In reply to Re^7: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? (update) by Darth Ed
in thread How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? by Darth Ed

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (2)
As of 2024-04-17 02:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found