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

com.testvagrant.optimus.commons.AppFinder 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.commons;

import com.testvagrant.optimus.core.exceptions.AppNotFoundException;

import java.io.File;
import java.nio.file.Paths;

public class AppFinder {

  private AppFinder() {}

  public static AppFinder getInstance() {
    return new AppFinder();
  }

  public String getDefaultPath(String appDir, String app) {
    String appPath = String.format("%s/%s/%s", SystemProperties.USER_DIR, appDir, app);
    if (!new File(appPath).exists()) {
      throw new AppNotFoundException(appPath);
    }

    return Paths.get(appPath).toAbsolutePath().toString();
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy