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

com.epam.jdi.light.driver.get.DriverTypes Maven / Gradle / Ivy

There is a newer version: 1.6.0
Show newest version
package com.epam.jdi.light.driver.get;

import static com.epam.jdi.light.common.Exceptions.exception;

/**
 * Created by Roman Iovlev on 14.02.2018
 * Email: [email protected]; Skype: roman.iovlev
 */

public enum DriverTypes {
    CHROME("chrome"),
    FIREFOX("firefox"),
    IE("ie"),
    EDGE("edge"),
    PHANTOMJS("phantom"),
    OPERA("opera");

    public final String name;
    public static DriverTypes getByName(String name) {
        switch (name.toLowerCase()) {
            case "chrome": return CHROME;
            case "firefox": return FIREFOX;
            case "ie":
            case "internetexplorer":
                return IE;
            case "edge": return EDGE;
            case "phantom":
            case "phantomjs":
                return PHANTOMJS;
            case "opera": return OPERA;
            default:
                throw exception("Unknown driver: " + name);
        }
    }

    DriverTypes(String name) {
        this.name = name;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy