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

io.magentys.cinnamon.webdriver.actions.ActionsFactory Maven / Gradle / Ivy

There is a newer version: 0.2.0
Show newest version
package io.magentys.cinnamon.webdriver.actions;

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.remote.BrowserType;

import static io.magentys.cinnamon.webdriver.WebDriverUtils.getBrowserName;

public class ActionsFactory {

    public static Actions create(final WebDriver webDriver) {
        switch (getBrowserName(webDriver)) {
        case BrowserType.CHROME:
            return new ChromeActions(webDriver);
        case BrowserType.IE:
            return new InternetExplorerActions(webDriver);
        case BrowserType.SAFARI:
            return new SafariActions(webDriver);
        default:
            return new DefaultActions(webDriver);
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy