phridge
phridge copied to clipboard
A bridge between node and PhantomJS
I use the code: `.then(function (phantom) { var page = phantom.createPage(); var jqueryPath = path.resolve(__dirname, "jquery-3.2.1.min.js"); var babelPolyfillPath = path.resolve(__dirname, "babel-polyfill.js"); return page.run(jqueryPath, babelPolyfillPath, function (jqueryPath, babelPolyfillPath, resolve, reject) {...
var phridge = require("phridge"); var path = require("path"); var jqueryPath = path.resolve(__dirname, "jquery-1.6.1.min.js"); phridge.spawn() .then(function (phantom) { return phantom.openPage("http://localhost:3000/"); }) .then(function (page) { page.injectJs(jqueryPath); return page.run(function () { return this.evaluate(function...
The `phantom.run("h1"...` code example in README.js uses `phantom.run` and `phantom.addCookie` methods. First one is a [custom phridge](https://github.com/peerigon/phridge/blob/master/lib/Phantom.js#L115) method, second is a [native PhantomJS method](http://phantomjs.org/api/webpage/method/add-cookie.html), so these two `phantom` objects must...
I want to be able to call from the phantom code to the node module. The code added a function calls "nodeCallback" at the phantom side and property calls "onCallback"...
Seems like we cannot extend some error objects, see https://github.com/peerigon/phridge/issues/52#issue-137032149
I tried using this with slimerjs (replacing the phantomjs module and supplying `.path` to slimerjs) and it worked, which isn't surprizing as slimer aims to have almost identical API as...
In the spirit of the SlimerJS support request, how complicated would it be to support CasperJS?