コード例 #1
0
ファイル: FirefoxProfile.java プロジェクト: santiycr/selenium
  protected void addWebDriverExtensionIfNeeded(boolean forceCreation) throws IOException {
    File extensionLocation = new File(extensionsDir, EXTENSION_NAME);
    if (!forceCreation && extensionLocation.exists()) return;

    boolean isDev = Boolean.getBoolean("webdriver.firefox.development");
    if (isDev) {
      installDevelopmentExtension();
    } else {
      addExtension(FirefoxProfile.class, "webdriver-extension.zip");
    }

    deleteExtensionsCacheIfItExists();
  }
コード例 #2
0
ファイル: FirefoxProfile.java プロジェクト: GruLab/webdriver
  protected void addWebDriverExtensionIfNeeded(boolean forceCreation) throws IOException {
    File extensionLocation = new File(extensionsDir, EXTENSION_NAME);
    if (!forceCreation && extensionLocation.exists()) return;

    String home = System.getProperty("webdriver.firefox.development");
    if (home != null) {
      System.out.println("Installing developer version");
      installDevelopmentExtension(home);
    } else {
      addExtension(FirefoxProfile.class, "webdriver-extension.zip");
    }

    deleteExtensionsCacheIfItExists();
  }