Chuchoo Chuchoo - 24 days ago 7
Java Question

PhantomJSDriverService not recognized by eclipse

I am trying to utilize phantoJS to run my selenium test in a headless mode. For that I am doing following,

DesiredCapabilities caps = new DesiredCapabilities();
caps.setJavascriptEnabled(true);
caps.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY,
"path/to/your/phantomjs.exe"
);


For some reason PhantomJSDriverService is underlined as an error in eclipse. I am not able to call PHANTOMJS_EXECUTABLE_PATH_PROPERTY using dot notation from PhantomJSDriverService.

What might I be doing wrong? Will explain more if it doesn't make sense.

Answer

You need to have phantomjsdriver in your build path. Get the latest version...

Comments