in reply to How do I get WWW::Mechanize::PhantomJS to wait until the JavaScript on the web page has finished executing?
Note also that JS can run in parallel.
So you have to tell Mechanize to wait for an DOM-element to appear which represent the state you consider "finished".
When working with WWW::Mechanize::Firefox many years ago I used this Wait-until-an-element-appears approach.
You have to see how this best translates to PhantomJS and your use case.
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
|---|