cognitom / wdio-phantomjs-service

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

add phatomjsArgs #2

Closed yoshi6jp closed 8 years ago

yoshi6jp commented 8 years ago

added phantomjsArgs options.

cognitom commented 8 years ago

Thanks! Basically LGTM 👍 Have you considered to use an object like this? :

export.config = {
  // ...
  services: ['phantomjs'],
  phantomjsOpts: {
    webdriverLogfile: 'phantomjs.log',
    ignoreSslErrors: true
  }
  // ...
}

PhantomJS provides the way via config.json so we could follow the naming convention of that. http://phantomjs.org/api/command-line.html#command-line-options

yoshi6jp commented 8 years ago

In my opinion

export.config = {
  // ...
  services: ['phantomjs'],
  phantomjsArgs: [
    '--config=/path/to/config.json'
  ]
  // ...
}
{
  "ignoreSslErrors": true
}
cognitom commented 8 years ago

wdio-sauce-service handles options well. They convert --arg to { option } here: https://github.com/bermi/sauce-connect-launcher/blob/master/lib/process_options.js

We'd rather follow them?

cognitom commented 8 years ago

Super cool! Thanks. I'm merging this.

cognitom commented 8 years ago

@yoshi6jp now version 0.2.2 has been published 😄

Because of some issues (#3, #4), it took a time.