Installing CasperJS on Windows: How to do it correctly?

Poor documentation for windows. http://casperjs.org/installation.html#windows It starts off assuming you have already installed without telling you how to install. So here it is if anyone else is confused about this. There is no actual install. It’s just extracting zip contents to the right place. download phantomjs for windows from the phantomjs site (it’s a zip … Read more

Karma, PhantomJS and es6 Promises

You can pull in the Babel polyfill by simply installing Babel Polyfill: npm install –save-dev babel-polyfill and then include the polyfill file before your source and test files within the files section of your karma.conf.js: files: [ ‘node_modules/babel-polyfill/dist/polyfill.js’, ‘index.js’, //could be /src/**/*.js ‘index.spec.js’ //could be /test/**/*.spec.js ], Unless you know that all your target browsers … Read more

How to properly stop phantomjs execution

As of July 2016, driver.close() and driver.quit() weren’t sufficient for me. That killed the node process but not the phantomjs child process it spawned. Following the discussion on this GitHub issue, the single solution that worked for me was to run: import signal driver.service.process.send_signal(signal.SIGTERM) # kill the specific phantomjs child proc driver.quit() # quit the … Read more

Debugging PhantomJS webpage.open failures

Found this post which explains how to set up callbacks to get at the underlying reason for the failure: http://newspaint.wordpress.com/2013/04/25/getting-to-the-bottom-of-why-a-phantomjs-page-load-fails/ Based on the that page, you could print out errors as follows: page.onResourceError = function(resourceError) { console.error(resourceError.url + ‘: ‘ + resourceError.errorString); }; The page goes on to show an example of detailed logging for … Read more

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