com.testvagrant.optimuscloud.driver.DriverCreatorFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-client Show documentation
Show all versions of java-client Show documentation
The Java Client provides access to Optimus cloud for all java based projects.
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