use of com.testsigma.agent.exception.MobileLibraryInstallException in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method installAppiumSettings.
private void installAppiumSettings(IDevice device) throws MobileLibraryInstallException {
try {
// if (commandExecutor.isPackageInstalled(device, APPIUM_SETTINGS_PACKAGE)) {
// log.info("io.appium.settings is already installed. So Skipping the install");
// return;
// }
log.info("Installing AppiumSettings on device" + device.getSerialNumber());
device.installPackage(appiumSettingAPK().getAbsolutePath(), true);
} catch (Exception e) {
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
use of com.testsigma.agent.exception.MobileLibraryInstallException in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method uninstallAppiumSettings.
private void uninstallAppiumSettings(IDevice device) throws MobileLibraryInstallException {
try {
if (!commandExecutor.isPackageInstalled(device, APPIUM_SETTINGS_PACKAGE)) {
log.info("io.appium.settings is not installed. So Skipping the uninstall");
}
log.info("Uninstalling AppiumSettings on device" + device.getSerialNumber());
device.uninstallPackage(APPIUM_SETTINGS_PACKAGE);
} catch (Exception e) {
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
use of com.testsigma.agent.exception.MobileLibraryInstallException in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method uninstallDrivers.
public void uninstallDrivers(String uniqueId) throws MobileLibraryInstallException {
try {
MobileDevice mobileDevice = deviceContainer.getDevice(uniqueId);
IDevice device = mobileDevice.getIDevice();
this.uninstallUIAutomatorServer(device);
this.uninstallUIAutomatorServerTest(device);
this.uninstallAppiumSettings(device);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
use of com.testsigma.agent.exception.MobileLibraryInstallException in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method uninstallUIAutomatorServerTest.
private void uninstallUIAutomatorServerTest(IDevice device) throws MobileLibraryInstallException {
try {
if (!commandExecutor.isPackageInstalled(device, UI_AUTOMATOR2_TEST_PACKAGE)) {
log.info("io.appium.uiautomator2.server is not installed. So Skipping the uninstall");
}
log.info("Uninstalling UIAutomatorServerTest on device" + device.getSerialNumber());
device.uninstallPackage(UI_AUTOMATOR2_TEST_PACKAGE);
} catch (Exception e) {
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
use of com.testsigma.agent.exception.MobileLibraryInstallException in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method installUIAutomatorServer.
private void installUIAutomatorServer(IDevice device) throws MobileLibraryInstallException {
try {
// if (commandExecutor.isPackageInstalled(device, UI_AUTOMATOR2_PACKAGE)) {
// log.info("io.appium.uiautomator2.server is already installed. So Skipping the install");
// return;
// }
log.info("Installing UIAutomatorServer on device" + device.getSerialNumber());
device.installPackage(uiAutomatorServerAPK().getAbsolutePath(), true);
} catch (Exception e) {
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
Aggregations