All Downloads are FREE. Search and download functionalities are using the official Maven repository.

at.willhaben.willtest.util.BrowserSelectionUtils Maven / Gradle / Ivy

There is a newer version: 3.1.10
Show newest version
package at.willhaben.willtest.util;

public class BrowserSelectionUtils {

    private static final String DEFAULT_FIREFOX = "firefox";
    private static final String DEFAULT_CHROME = "chrome";
    private static final String DEFAULT_IE = "ie";
    private static final String DEFAULT_EDGE = "edge";

    public static String getBrowser() {
        return Environment.getValue("browser", DEFAULT_FIREFOX).toLowerCase();
    }

    public static boolean isFirefox() {
        return getBrowser().equals(DEFAULT_FIREFOX);
    }

    public static boolean isChrome() {
        return getBrowser().equals(DEFAULT_CHROME);
    }

    public static boolean isIE() {
        return getBrowser().equals(DEFAULT_IE);
    }

    public static boolean isEdge() {
        return getBrowser().equals(DEFAULT_EDGE);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy