PhantomjsDriver not working on both Windows and Linux PhantomjsDriver not working on both Windows and Linux selenium selenium

PhantomjsDriver not working on both Windows and Linux


If it is still not working for you on Linux, try below piece of code, it is working for me on Mac.

capabilities.setCapability("phantomjs.binary.path", "path of phantom binary/phantomjs")


org.openqa.selenium.remote.UnreachableBrowserException clearly something to do with Phantom. On Windows ensure Phantom is running (Set Environment variable and add PATH)Check that Remote Machine hub address is correct and you should be able to run phantomjs.

Note: Selenium Server must be running on the desired remote machine.

DesiredCapabilities phantomBeast = DesiredCapabilities.phantomjs();try {    webDriverInstance = new RemoteWebDriver(new URL(hubUrl), phantomBeast);} catch (Exception e) {    //Do something }