private static String getEdgeDefaultPath() { if (OsUtils.isWindows()) { if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/edgedriver-windows-64bit")) || Files.notExists(Paths.get("./drivers/edgedriver-windows-32bit")))) { return "drivers/edgedriver-windows-64bit"; } else { return "drivers/edgedriver-windows-32bit"; } } return null; }
private static String getPhantomJsDefaultPath() { if (OsUtils.isWindows()) { return "drivers/phantomjs-windows-64bit.exe"; } else if (OsUtils.isMac()) { return "drivers/phantomjs-mac-64bit"; } else if (OsUtils.isLinux()) { if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/phantomjs-linux-64bit")) || Files.notExists(Paths.get("./drivers/phantomjs-linux-32bit")))) { return "drivers/phantomjs-linux-64bit"; } else { return "drivers/phantomjs-linux-32bit"; } } return null; }
private static String getInternetExplorerDriverDefaultPath() { if (OsUtils.isWindows()) { if (!PropertyUtils.propertyExists(IE_DRIVER_USE64BIT_PROPERTY_NAME) || !PropertyUtils.propertyExists(INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME)) { if (OsUtils.isWindows10()) { return "drivers/internetexplorerdriver-windows-64bit.exe"; } else { return "drivers/internetexplorerdriver-windows-32bit.exe"; } } else { if (PropertyUtils.isTrue(IE_DRIVER_USE64BIT_PROPERTY_NAME) || PropertyUtils.isTrue(INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME)) { return "drivers/internetexplorerdriver-windows-64bit.exe"; } else { return "drivers/internetexplorerdriver-windows-32bit.exe"; } } } return null; }
private static String getFirefoxDriverDefaultPath() { if (OsUtils.isWindows()) { if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/geckodriver-windows-64bit")) || Files.notExists(Paths.get("./drivers/geckodriver-windows-32bit")))) { return "drivers/geckodriver-windows-64bit.exe"; } else { return "drivers/geckodriver-windows-32bit.exe"; } } else if (OsUtils.isMac()) { if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/geckodriver-mac-64bit")) || Files.notExists(Paths.get("./drivers/geckodriver-mac-32bit")))) { return "drivers/geckodriver-mac-64bit"; } else { return "drivers/geckodriver-mac-32bit"; } } else if (OsUtils.isLinux()) { if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/geckodriver-linux-64bit")) || Files.notExists(Paths.get("./drivers/geckodriver-linux-32bit")))) { return "drivers/geckodriver-linux-64bit"; } else { return "drivers/geckodriver-linux-32bit"; } } return null; }