ReferenceError: Can’t find variable: jQuery with Poltergeist/Capybara

If jQuery is on the page you most likely have to use an evaluate function to enter the context of the page. CasperJS has this diagram http://docs.casperjs.org/en/latest/_images/evaluate-diagram.png http://phantomjs.org/api/webpage/method/evaluate.html The execution is sandboxed, the web page has no access to the phantom object and it can’t probe its own setting.

phantomJS webpage timeout

PhantomJS 1.9 has introduced a new setting, resourceTimeout, that controls how long a request can take before it gets cancelled. Along with that, there’s a onResourceTimeout event that is triggered if/when a request times out. Here’s a code snippet illustrating all of the above: var page = require(‘webpage’).create(); page.settings.resourceTimeout = 5000; // 5 seconds page.onResourceTimeout … Read more

How do I access an iframe from CasperJS?

Spent forever looking for this, and of course I found the answer minutes after posting the question. I can use the new frame switching commands added to phantomjs in this commit. Specifically, the this.page.switchToChildFrame(0) and this.page.switchToParentFrame() functions. It appears undocumented, and it also seems that the methods have been changed for upcoming releases, but it … Read more

ffmpeg throwing “Output file #0 does not contain any stream” when trying to make a slideshow out of images

Your present command doesn’t specify any input, so use phantomjs runner.js | ffmpeg -f image2pipe -i pipe:.png -c:a copy -c:v libx264 -f flv rtmp://localhost/mystream There’s no audio input, so setting an audio codec is pointless. If your output needs an audio stream, use phantomjs runner.js | ffmpeg -f image2pipe -i pipe:.png -f lavfi -i anullsrc … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)