use of com.testsigma.agent.exception.TestsigmaException in project testsigma by testsigmahq.
the class TestPlanRunTask method setupLocalDevice.
protected void setupLocalDevice() throws AutomatorException {
log.info("Setting up local mobile device");
try {
checkDeviceAvailability();
TestDeviceSettings testDeviceSettings = environment.getEnvSettings();
setAppiumUrl(testDeviceSettings);
testDeviceSettings.setDeviceName(mobileDevice.getName());
testDeviceSettings.setDeviceUniqueId(mobileDevice.getUniqueId());
if (Platform.Android.equals(getEnvPlatform())) {
testDeviceSettings.setChromedriverExecutableDir(PathUtil.getInstance().getDriversPath());
} else if (Platform.iOS.equals(getEnvPlatform())) {
iosDeviceService.setupWda(mobileDevice);
}
environment.setEnvSettings(testDeviceSettings);
mobileAutomationServerService.installDrivers(this.mobileDevice.getOsName(), this.mobileDevice.getUniqueId());
} catch (TestsigmaException | DeviceNotConnectedException | MobileLibraryInstallException e) {
log.error(e.getMessage(), e);
throw new AutomatorException(e.getMessage(), e);
}
}
use of com.testsigma.agent.exception.TestsigmaException in project testsigma by testsigmahq.
the class IosDeviceListener method initializeNativeBridge.
public void initializeNativeBridge() throws TestsigmaException {
if (bridgeInitialized) {
return;
}
try {
this.usbMuxSocket = iosDeviceService.createConnection();
bridgeInitialized = true;
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new TestsigmaException(e.getMessage(), e.getMessage());
}
}
use of com.testsigma.agent.exception.TestsigmaException in project testsigma by testsigmahq.
the class IosDeviceService method setupWda.
public void setupWda(MobileDevice device) throws TestsigmaException, AutomatorException {
log.info("Setting up WDA on device - " + device.getName());
try {
wdaService.installWdaToDevice(device);
wdaService.startWdaOnDevice(device);
} catch (Exception e) {
log.error("Error while setting up wda and starting it. Error - ");
log.error(e.getMessage(), e);
cleanupWda(device);
throw new TestsigmaException(e.getMessage(), e);
}
}
Aggregations