/**
  * Configure the custom Firefox profiledirectory on the webdriver factory.
  *
  * @param directory
  */
 public void loadFirefoxProfileFromDirectory(String directory) {
   defaultWebDriverSupplier.setCustomProfilePreferencesFile(new File(directory));
 }
 private WebDriver defaultWebDriverInstance() {
   return defaultWebDriverSupplier.newWebDriver();
 }
 /**
  * Configure the custom Firefox preferences (javascript) file on the webdriver factory.
  *
  * @param filename
  */
 public void loadCustomBrowserPreferencesFromFile(String filename) {
   defaultWebDriverSupplier.setCustomProfilePreferencesFile(new File(filename));
 }
 /** @param browser Name of the browser, as accepted by the DefaultWebDriverSupplier. */
 private void setBrowser(String browser) {
   defaultWebDriverSupplier.setBrowser(browser);
 }