
com.appium.manager.AppiumDeviceManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of AppiumTestDistribution Show documentation
Show all versions of AppiumTestDistribution Show documentation
A tool run Android and iOS test in parallel across devices
package com.appium.manager;
import com.appium.capabilities.DriverSession;
import com.appium.entities.MobilePlatform;
import com.appium.plugin.PluginClI;
import java.io.IOException;
/**
* Device Manager - Handles all device related information's e.g UDID, Model, etc
*/
public class AppiumDeviceManager {
private static ThreadLocal appiumDevice = new ThreadLocal<>();
public static DriverSession getAppiumDevice() {
return appiumDevice.get();
}
protected static void setDevice(DriverSession device) {
appiumDevice.set(device);
}
public static MobilePlatform getMobilePlatform() {
return MobilePlatform.valueOf(PluginClI.getInstance().getPlatFormName().toUpperCase());
}
public static boolean isPlatform(MobilePlatform expectedPlatform) throws IOException {
return AppiumDeviceManager.getMobilePlatform().equals(expectedPlatform);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy