クラス WebDriverInstaller

java.lang.Object
one.cafebabe.webdriverinstaller.WebDriverInstaller

public abstract class WebDriverInstaller extends Object
web driver
  • フィールド詳細

    • CHROME_DRIVER_ENV_NAME

      protected static final String CHROME_DRIVER_ENV_NAME
      environment variable to specify where to store Chrome Driver
      関連項目:
    • CHROME_DRIVER_PROPERTY_NAME

      protected static final String CHROME_DRIVER_PROPERTY_NAME
      system property to specify where to store Chrome Driver
      関連項目:
    • GECKO_DRIVER_ENV_NAME

      protected static final String GECKO_DRIVER_ENV_NAME
      environment variable where to store gecko driver
      関連項目:
    • GECKO_DRIVER_PROPERTY_NAME

      protected static final String GECKO_DRIVER_PROPERTY_NAME
      system property where to store gecko driver
      関連項目:
  • メソッドの詳細

    • ensureChromeDriverInstalled

      public static Optional<String> ensureChromeDriverInstalled()
      Checks if suitable version of ChromeDriver applicable to the version of installed Google Chrome at the path specified by CHROME_DRIVER_HOME environment variable or $HOME/chromedriver If ChromeDriver is not found, attempts to download it from https://chromedriver.storage.googleapis.com/ System Property "webdriver.chrome.driver" will be also set.
      戻り値:
      absolute path to installed chromedriver
    • ensureGeckoDriverInstalled

      public static Optional<String> ensureGeckoDriverInstalled()
      Checks if suitable version of geckodriver applicable to the version of installed Firefox at the path specified by GECKO_DRIVER_HOME environment variable, or geckodriver.home system property, or $HOME/geckodriver If geckodriver is not found, attempts to download it from mozilla geckodriver Releases System Property "webdriver.gecko.driver" will be also set.
      戻り値:
      absolute path to installed geckodriver
    • getInstalledAppVersion

      public Optional<String> getInstalledAppVersion()
      Returns version string of installed app.
      戻り値:
      version string of installed app
    • isWin

      protected boolean isWin()
      check if the running OS is Windows
      戻り値:
      true is the running OS is Windows
    • getAppPath

      protected String getAppPath(String name) throws IOException, InterruptedException
      check app path
      パラメータ:
      name - command to search
      戻り値:
      path
      例外:
      IOException - IOException
      InterruptedException - InterruptedException
    • getAppVersion

      protected String getAppVersion(String appPath) throws IOException, InterruptedException
      check app version
      パラメータ:
      appPath - app path to check
      戻り値:
      version
      例外:
      IOException - IOException
      InterruptedException - InterruptedException