petecoop / phantasma

A high level promise based wrapper for phantomjs
ISC License
33 stars 8 forks source link

Phantom path #35

Closed gizmodude4 closed 8 years ago

gizmodude4 commented 8 years ago

It looks like Phantasma isn't forwarding the binary location on to PhantomJS. I modified PhantomJS to print out the binary location. This for loop doesn't actually do anything with phantomPath. I modified it to manually take in phantomPath, but this definitely won't work if I haven't specified anything.

for(var o in this.options){
    if(this.options[o] !== null){
      if(OPTIONS.params.indexOf(o) !== -1){
        options.parameters[changeCase.paramCase(o)] = this.options[o];
      }
      if(OPTIONS.options.indexOf(o) !== -1){
        options[o] = this.options[o];
      }
      if(OPTIONS.page.indexOf(o) !== -1){
        pageOptions[o] = this.options[o];
      }
    }
  }
  options['binary'] = this.options['phantomPath'];

Any ideas?

gizmodude4 commented 8 years ago

Ah, I was using phantomPath when I should have been using binary

petecoop commented 8 years ago

@gizmodude4 is this something that should be cleared up in the docs at all?

gizmodude4 commented 8 years ago

I'd say so. You have phantomPath listed as the property for that, but it doesn't work. binary does though

petecoop commented 8 years ago

Yeah I see, I've updated it