@Override protected PhantomJSDriverService newDriverService() { PhantomJSDriverService newService = new PhantomJSDriverService.Builder() .usingAnyFreePort() .usingPhantomJSExecutable(phantomJSBinary()) .build(); DriverPathConfiguration.updateSystemProperty(PHANTOMJS_BINARY_PATH.getPropertyName()) .withExecutablePath(phantomJSBinary()); Runtime.getRuntime().addShutdownHook(new StopServiceHook(newService)); return newService; }
.usingAnyFreePort() .withProxy(proxy) .withLogFile(new File(PHANTOMJS_DEFAULT_LOGFILE))
.usingAnyFreePort() .withProxy(proxy) .withLogFile(findLogFile())