Protractor: PhantomJS driver executable

Created on 27 Mar 2014  ·  3Comments  ·  Source: angular/protractor

I'm trying to run Protractor with PhantomJS.
I get this error message:
"The path to the driver executable must be set by the phantomjs.binary.path capability/system property/PATH variable."
I know the location of phantomjs.exe.
What do I have to set? "capability/system property/PATH" variable is kind of vague.
Is this something I can specify in my protractor.conf.js file? If so, how?

Most helpful comment

Note, at least in the setup that I'm using (and in the error message referenced above), the correct property is phantomjs.binary.path, not phantom.binary.path.

All 3 comments

Answering my own question ... hopefully to benefit others:
You can do this in protractor.conf.js:

capabilities: {
  browserName: 'phantomjs',
  'phantom.binary.path': 'the-path-goes-here'
}

I get another error now though, "Can't find variable: angular".
These tests run fine in Chrome.

My server was blocked for some reason. Everything is working now. So the key was the 'phantom.binary.path' property in capabilities.

Note, at least in the setup that I'm using (and in the error message referenced above), the correct property is phantomjs.binary.path, not phantom.binary.path.

Was this page helpful?
0 / 5 - 0 ratings