cognitom / wdio-phantomjs-service

WebdriverIO service to start & stop PhantomJS
MIT License
8 stars 1 forks source link

Support for Node 6.x? #7

Open portokallidis opened 7 years ago

portokallidis commented 7 years ago

Hi I installed your example(https://github.com/cognitom/webdriverio-examples.git) for only phantomjs setup. I am on node v6.9.4 And got this:

$ wdio test/wdio.conf.js
A service failed in the 'onPrepare' hook
Error: Exit code: 127
    at ChildProcess.<anonymous> (/home/nporto/wdio-test/node_modules/phantomjs-prebuilt/lib/phantomjs.js:117:18)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)

i npm installed on a fresh ubuntu 16.04 with nodejs v6.9.4 and npm 3.10.10

portokallidis commented 7 years ago

I installed selenium standalone and then got another error, It couldnt find the binary path so i did that:

exports.config = {
  capabilities: [
    { 
      'browserName': 'phantomjs',
      'phantomjs.binary.path': '/home/nporto/wdio-test/node_modules/phantomjs-prebuilt/bin/phantomjs'
    }

And then i stopped the selenium standalone server and continues to work.

Can this be done without installing java and selenium?

cognitom commented 7 years ago

Hi @portokallidis, we have tests on Node 6, too. It should work. https://github.com/cognitom/wdio-phantomjs-service/blob/master/.travis.yml

pscheit commented 7 years ago

apt get install libfontconfig fixes this for me