screenshotsResultsPath = new File(RESULTS_BASE_PATH + File.separator + SCREENSHOT_PATH).getAbsolutePath();
if (!new File(screenshotsResultsPath).exists()) {
new File(screenshotsResultsPath).mkdirs();
}
LoggingResultsFormatter htmlFormatter = new HtmlResultFormatter(loggingWriter, RESULT_FILE_ENCODING);
htmlFormatter.setScreenShotBaseUri(SCREENSHOT_PATH + "/");
htmlFormatter.setAutomaticScreenshotPath(screenshotsResultsPath);
LoggingCommandProcessor myProcessor = new LoggingCommandProcessor(new HttpCommandProcessor(getClient()
+ "/selenium-server/driver/", browserType, getServer()), htmlFormatter);
return myProcessor;
}