Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^8: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? (update)

by bliako (Monsignor)
on Aug 24, 2021 at 10:06 UTC ( [id://11136050]=note: print w/replies, xml ) Need Help??


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)
in thread How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing?

perhaps stupid suggestion, but shouldn't the polyfills be injected before any other JS-from-server being run (not after)? Is there a way to first inject the polyfills and then load the page, without "erasing" them? Hmmm tricky. Perhaps fetch the page, even with errors. Then insert the polyfills. Then initiate a re-run which will already have the poly-fills added. The latter perhaps with triggering an event or running a JS function. My first call would be to check if polyfills can be run OK with your current setup. Make a local html test file and load them in WWW::Mechanize::*. If test is successful then you may have a way to solve your problem.

bw, bliako

  • Comment on Re^8: How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing? (update)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11136050]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (3)
As of 2024-04-20 09:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found