com.testvagrant.optimus.commons.AppFinder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of optimus-lite Show documentation
Show all versions of optimus-lite Show documentation
Optimus Lite API to manage test devices and create appium driver based on platform
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