0

i am using Selenium 2.44.0 and PhantomJS 1.9.8. My code:

DesiredCapabilities c = new DesiredCapabilities();
c.setCapability(PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "<url to phantomjs.exe>");
WebDriver w = new PhantomJSDriver(c);

Error:

NoClassDefFoundError: org/openqa/selenium/browserlaunchers/Proxies

What should I do?

Andrew Regan
  • 5,087
  • 6
  • 37
  • 73

1 Answers1

2

Selenium 2.44.0 is pretty old now (October 2014), and PhantomJS 1.9.x is also pretty well obsolete.

However, the 2.44.0 / PhantomJS incompatibility is quite well documented:

https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/8088 https://github.com/detro/ghostdriver/issues/397

And the solution was provided in 2.45.0 with an updated PhantomJS driver (i.e. Selenium Java code, no change to the application).

So all you actually need to do is upgrade to 2.45.0.

Community
  • 1
  • 1
Andrew Regan
  • 5,087
  • 6
  • 37
  • 73