I have difficulties setting the capability PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY
in my Java program correctly in order to use the newest version of Ghostdriver from github together with my installed phantomjs version (1.9.1)
Here is what I do in my Java program
DesiredCapabilities caps = DesiredCapabilities.phantomjs();
caps.setCapability(
PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
"/xxx/phantomjs-1.9.1-linux-x86_64/bin/phantomjs" );
caps.setCapability(
PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY,
"/xxx/ghostdriver/src/main.js");
WebDriver driver = new PhantomJSDriver(caps);
The selenium driver starts correctly, if i do not set the PhantomJSDriverService.PHANTOMJS_GHOSTDRIVER_PATH_PROPERTY
, but I get some errors in my tests that are supposed to be fixed in the current developer branch of ghostdriver. So i followed this advice and set up the cuttent github version of ghostdriver.
However, now I get the following error:
[ERROR - 2013-07-12T10:22:36.897Z] GhostDriver - Main - Could not start Ghost Driver => {
"message": "Could not start Ghost Driver",
"line": 79,
"sourceId": 140320571924032,
"sourceURL": "/xxx/ghostdriver/src/main.js",
"stack": "Error: Could not start Ghost Driver\n at /xxx/ghostdriver/src/main.js:79",
"stackArray": [
{
"sourceURL": "/xxx/ghostdriver/src/main.js",
"line": 79
}
]
}
My question is, does anyone know how to fix this? Must I change the config.js
of ghostdriver somehow to make this work?
Info: I am crossposting this also to the github issues of ghostdriver.