com.testvagrant.optimuscloud.utils.CapToManCapConverter 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.utils;
import com.testvagrant.optimuscloud.entities.MandatoryCaps;
import org.openqa.selenium.Capabilities;
public class CapToManCapConverter {
public static MandatoryCaps convert(String buildNo, Capabilities desiredCapabilities) {
MandatoryCaps mandatoryCaps = new MandatoryCaps();
mandatoryCaps.setBuildNo(buildNo);
mandatoryCaps.setPlatformName((String) desiredCapabilities.getCapability("platformName"));
mandatoryCaps.setPlatformVersion((String) desiredCapabilities.getCapability("platformVersion"));
mandatoryCaps.setDeviceType((String) desiredCapabilities.getCapability("deviceType"));
mandatoryCaps.setUdid((String) desiredCapabilities.getCapability("udid"));
mandatoryCaps.setDeviceName((String) desiredCapabilities.getCapability("deviceName"));
return mandatoryCaps;
}
public static MandatoryCaps convert(Capabilities desiredCapabilities) {
MandatoryCaps mandatoryCaps = new MandatoryCaps();
mandatoryCaps.setPlatformName((String) desiredCapabilities.getCapability("platformName"));
mandatoryCaps.setPlatformVersion((String) desiredCapabilities.getCapability("platformVersion"));
mandatoryCaps.setDeviceType((String) desiredCapabilities.getCapability("deviceType"));
mandatoryCaps.setUdid((String) desiredCapabilities.getCapability("udid"));
mandatoryCaps.setDeviceName((String) desiredCapabilities.getCapability("deviceName"));
return mandatoryCaps;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy