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

com.testvagrant.optimus.devicemanager.DeviceManagerProvider Maven / Gradle / Ivy

Go to download

Optimus Lite API to manage test devices and create appium driver based on platform

There is a newer version: 0.1.7-beta
Show newest version
package com.testvagrant.optimus.devicemanager;

import com.testvagrant.optimus.commons.SystemProperties;
import com.testvagrant.optimus.core.models.OptimusSupportedPlatforms;
import com.testvagrant.optimus.core.parser.MobileTestFeedParser;

public class DeviceManagerProvider {

  private static DeviceManager deviceManagerProvider;

  private DeviceManagerProvider() {}

  public static DeviceManager getInstance() {
    if (deviceManagerProvider == null) {
      synchronized (DeviceManagerProvider.class) {
        if (deviceManagerProvider == null) {
          deviceManagerProvider = new DeviceManagerProvider().get();
        }
      }
    }
    return deviceManagerProvider;
  }

  public DeviceManager get() {
    MobileTestFeedParser parser = new MobileTestFeedParser(SystemProperties.MOBILE_FEED);
    return parser.getPlatform() == OptimusSupportedPlatforms.IOS
        ? new IosDeviceManager()
        : new AndroidDeviceManager();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy