// Path: src/main/java/com/github/webdriverextensions/internal/utils/FileUtils.java
// public class FileUtils {
// 
//     private FileUtils() {}
//     
//     public static void makeExecutable(String path) {
//         if (path == null) {
//             return;
//         }
//         File file = new File(path);
//         if (file.exists() && !file.canExecute()) {
//             file.setExecutable(true);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/internal/utils/OsUtils.java
// public class OsUtils {
// 
//     private OsUtils() {}
// 
//     public static boolean isWindows() {
//         return Platform.getCurrent().is(Platform.WINDOWS);
//     }
// 
//     public static boolean isWindows10() {
//         return Platform.getCurrent().is(Platform.WIN10);
//     }
// 
//     public static boolean isMac() {
//         return Platform.getCurrent().is(Platform.MAC);
//     }
// 
//     public static boolean isLinux() {
//         return Platform.getCurrent().is(Platform.LINUX);
//     }
// 
//     public static boolean isCurrentPlatform(String platform) {
//         try {
//             return Platform.getCurrent().is(Platform.valueOf(platform));
//         } catch (IllegalArgumentException e) {
//             return false;
//         }
//     }
// 
//     public static boolean is64Bit() {
//         return com.sun.jna.Platform.is64Bit();
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/internal/utils/PropertyUtils.java
// public class PropertyUtils {
// 
//     private PropertyUtils() {}
//     
//     public static boolean isTrue(String key) {
//         return BooleanUtils.toBoolean(System.getProperty(key));
//     }
// 
//     public static boolean propertyExists(String key) {
//         return System.getProperty(key) != null;
//     }
// 
//     public static void setPropertyIfNotExists(String key, String value) {
//         if (value == null || StringUtils.isBlank(value)) {
//             return;
//         }
//         if (!propertyExists(key)) {
//             System.setProperty(key, value);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String IE_DRIVER_USE64BIT_PROPERTY_NAME = "webdriverextensions.ie.driver.use64Bit";
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String INTERNET_EXPLORER_DRIVER_PROPERTY_NAME = "webdriver.internetexplorer.driver"; // Alternative property name that follows naming convention
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME = "webdriverextensions.internetexplorer.driver.use64Bit";
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverProperties.java
// public class WebDriverProperties {
//     public static final String CHROME_DRIVER_PROPERTY_NAME = "webdriver.chrome.driver";
//     public static final String CHROME_BINARY_PROPERTY_NAME = "chrome.binary.path";
//     public static final String FIREFOX_DRIVER_PROPERTY_NAME = "webdriver.gecko.driver";
//     public static final String IE_DRIVER_PROPERTY_NAME = "webdriver.ie.driver";
//     public static final String PHANTOMJS_BINARY_PROPERTY_NAME = "phantomjs.binary.path";
//     public static final String OPERA_DRIVER_PROPERTY_NAME = "webdriver.opera.driver";
//     public static final String EDGE_DRIVER_PROPERTY_NAME = "webdriver.edge.driver";
//     public static final String DISABLED_BROWSERS_PROPERTY_NAME = "webdriverextensions.disabledbrowsers";
// }


import com.github.webdriverextensions.internal.utils.FileUtils;
import com.github.webdriverextensions.internal.utils.OsUtils;
import com.github.webdriverextensions.internal.utils.PropertyUtils;
import com.github.webdriverextensions.junitrunner.annotations.DriverPaths;
import java.nio.file.Files;
import java.nio.file.Paths;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.IE_DRIVER_USE64BIT_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.INTERNET_EXPLORER_DRIVER_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverProperties.*;
    }

    private static void makeSureDriversAreExecutable() {
        FileUtils.makeExecutable(System.getProperty(CHROME_DRIVER_PROPERTY_NAME));
        FileUtils.makeExecutable(System.getProperty(IE_DRIVER_PROPERTY_NAME));
    }

    private static String getChromeDriverDefaultPath() {
        if (OsUtils.isWindows()) {
            return "drivers/chromedriver-windows-32bit.exe";
        } else if (OsUtils.isMac()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/chromedriver-mac-64bit")) || Files.notExists(Paths.get("./drivers/chromedriver-mac-32bit")))) {
                return "drivers/chromedriver-mac-64bit";
            } else {
                return "drivers/chromedriver-mac-32bit";
            }
        } else if (OsUtils.isLinux()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/chromedriver-linux-64bit")) || Files.notExists(Paths.get("./drivers/chromedriver-linux-32bit")))) {
                return "drivers/chromedriver-linux-64bit";
            } else {
                return "drivers/chromedriver-linux-32bit";
            }
        }
        return null;
    }

    private static String getFirefoxDriverDefaultPath() {
        if (OsUtils.isWindows()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/geckodriver-windows-64bit.exe")) || Files.notExists(Paths.get("./drivers/geckodriver-windows-32bit.exe")))) {
                return "drivers/geckodriver-windows-64bit.exe";
// Path: src/main/java/com/github/webdriverextensions/internal/utils/FileUtils.java
// public class FileUtils {
// 
//     private FileUtils() {}
//     
//     public static void makeExecutable(String path) {
//         if (path == null) {
//             return;
//         }
//         File file = new File(path);
//         if (file.exists() && !file.canExecute()) {
//             file.setExecutable(true);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/internal/utils/OsUtils.java
// public class OsUtils {
// 
//     private OsUtils() {}
// 
//     public static boolean isWindows() {
//         return Platform.getCurrent().is(Platform.WINDOWS);
//     }
// 
//     public static boolean isWindows10() {
//         return Platform.getCurrent().is(Platform.WIN10);
//     }
// 
//     public static boolean isMac() {
//         return Platform.getCurrent().is(Platform.MAC);
//     }
// 
//     public static boolean isLinux() {
//         return Platform.getCurrent().is(Platform.LINUX);
//     }
// 
//     public static boolean isCurrentPlatform(String platform) {
//         try {
//             return Platform.getCurrent().is(Platform.valueOf(platform));
//         } catch (IllegalArgumentException e) {
//             return false;
//         }
//     }
// 
//     public static boolean is64Bit() {
//         return com.sun.jna.Platform.is64Bit();
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/internal/utils/PropertyUtils.java
// public class PropertyUtils {
// 
//     private PropertyUtils() {}
//     
//     public static boolean isTrue(String key) {
//         return BooleanUtils.toBoolean(System.getProperty(key));
//     }
// 
//     public static boolean propertyExists(String key) {
//         return System.getProperty(key) != null;
//     }
// 
//     public static void setPropertyIfNotExists(String key, String value) {
//         if (value == null || StringUtils.isBlank(value)) {
//             return;
//         }
//         if (!propertyExists(key)) {
//             System.setProperty(key, value);
//         }
//     }
// }
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String IE_DRIVER_USE64BIT_PROPERTY_NAME = "webdriverextensions.ie.driver.use64Bit";
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String INTERNET_EXPLORER_DRIVER_PROPERTY_NAME = "webdriver.internetexplorer.driver"; // Alternative property name that follows naming convention
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverExtensionsProperties.java
// public static final String INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME = "webdriverextensions.internetexplorer.driver.use64Bit";
// 
// Path: src/main/java/com/github/webdriverextensions/WebDriverProperties.java
// public class WebDriverProperties {
//     public static final String CHROME_DRIVER_PROPERTY_NAME = "webdriver.chrome.driver";
//     public static final String CHROME_BINARY_PROPERTY_NAME = "chrome.binary.path";
//     public static final String FIREFOX_DRIVER_PROPERTY_NAME = "webdriver.gecko.driver";
//     public static final String IE_DRIVER_PROPERTY_NAME = "webdriver.ie.driver";
//     public static final String PHANTOMJS_BINARY_PROPERTY_NAME = "phantomjs.binary.path";
//     public static final String OPERA_DRIVER_PROPERTY_NAME = "webdriver.opera.driver";
//     public static final String EDGE_DRIVER_PROPERTY_NAME = "webdriver.edge.driver";
//     public static final String DISABLED_BROWSERS_PROPERTY_NAME = "webdriverextensions.disabledbrowsers";
// }


// Path: src/main/java/com/github/webdriverextensions/internal/junitrunner/DriverPathLoader.java
import com.github.webdriverextensions.internal.utils.FileUtils;
import com.github.webdriverextensions.internal.utils.OsUtils;
import com.github.webdriverextensions.internal.utils.PropertyUtils;
import com.github.webdriverextensions.junitrunner.annotations.DriverPaths;
import java.nio.file.Files;
import java.nio.file.Paths;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.IE_DRIVER_USE64BIT_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.INTERNET_EXPLORER_DRIVER_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverExtensionsProperties.INTERNET_EXPLORER_DRIVER_USE64BIT_PROPERTY_NAME;
import static com.github.webdriverextensions.WebDriverProperties.*;

    }

    private static void makeSureDriversAreExecutable() {
        FileUtils.makeExecutable(System.getProperty(CHROME_DRIVER_PROPERTY_NAME));
        FileUtils.makeExecutable(System.getProperty(IE_DRIVER_PROPERTY_NAME));
    }

    private static String getChromeDriverDefaultPath() {
        if (OsUtils.isWindows()) {
            return "drivers/chromedriver-windows-32bit.exe";
        } else if (OsUtils.isMac()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/chromedriver-mac-64bit")) || Files.notExists(Paths.get("./drivers/chromedriver-mac-32bit")))) {
                return "drivers/chromedriver-mac-64bit";
            } else {
                return "drivers/chromedriver-mac-32bit";
            }
        } else if (OsUtils.isLinux()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/chromedriver-linux-64bit")) || Files.notExists(Paths.get("./drivers/chromedriver-linux-32bit")))) {
                return "drivers/chromedriver-linux-64bit";
            } else {
                return "drivers/chromedriver-linux-32bit";
            }
        }
        return null;
    }

    private static String getFirefoxDriverDefaultPath() {
        if (OsUtils.isWindows()) {
            if (OsUtils.is64Bit() && (Files.exists(Paths.get("./drivers/geckodriver-windows-64bit.exe")) || Files.notExists(Paths.get("./drivers/geckodriver-windows-32bit.exe")))) {
                return "drivers/geckodriver-windows-64bit.exe";
            } else {