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

com.testvagrant.optimuscloud.driver.DriverCreatorFactory Maven / Gradle / Ivy

Go to download

The Java Client provides access to Optimus cloud for all java based projects.

There is a newer version: 1.1.0
Show newest version
package com.testvagrant.optimuscloud.driver;

import org.openqa.selenium.Capabilities;
import org.openqa.selenium.NoSuchSessionException;

public class DriverCreatorFactory {

    public static DriverCreator getInstance(String sessionUrl, Capabilities desiredCapabilities) {
        switch (desiredCapabilities.getCapability("platformName").toString().toLowerCase()) {
            case "android":
                return new AndroidDriverCreator(sessionUrl,desiredCapabilities);
            case "ios":
                return new IosDriverCreator(sessionUrl,desiredCapabilities);
            default: throw new RuntimeException("Cannot find platformName capability to create a new driver");
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy