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

com.testvagrant.optimuscloud.utils.CapToManCapConverter 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.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