use of com.testsigma.agent.mobile.MobileDevice in project testsigma by testsigmahq.
the class DeviceEventCallback method onDevicePaired.
public void onDevicePaired(String uuid) throws TestsigmaException, DeviceContainerException {
MobileDevice mobileDevice = iosDeviceListener.getMobileDevice(uuid);
mobileDevice.setIsOnline(true);
mobileDevice.setIsEmulator(false);
iosDeviceListener.updateDevice(mobileDevice);
System.out.println("Paired: " + uuid);
}
use of com.testsigma.agent.mobile.MobileDevice in project testsigma by testsigmahq.
the class AgentDevicesController method show.
/**
* fetch the device details using device unique id.
*
* @param uniqueId
* @return AgentDeviceDTO - connected agent device details
* @throws DeviceNotConnectedException
*/
@GetMapping(produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public AgentDeviceDTO show(@PathVariable("unique_id") String uniqueId) throws DeviceNotConnectedException, TestsigmaException {
log.info("Received request fetch device details - " + uniqueId);
MobileDevice mobileDevice = deviceContainer.getDevice(uniqueId);
if (mobileDevice == null) {
throw new DeviceNotConnectedException("Device not online. Please check if the device is connected properly.");
}
return mobileDeviceMapper.map(mobileDevice);
}
use of com.testsigma.agent.mobile.MobileDevice 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.mobile.MobileDevice in project testsigma by testsigmahq.
the class AndroidMobileAutomationServer method installDrivers.
public void installDrivers(String uniqueId) throws MobileLibraryInstallException {
try {
MobileDevice mobileDevice = deviceContainer.getDevice(uniqueId);
IDevice device = mobileDevice.getIDevice();
this.installAppiumSettings(device);
this.startAppiumSettings(device);
this.installUIAutomatorServer(device);
this.installUIAutomatorServerTest(device);
} catch (Exception e) {
log.error(e.getMessage(), e);
throw new MobileLibraryInstallException(e.getMessage(), e);
}
}
use of com.testsigma.agent.mobile.MobileDevice in project testsigma by testsigmahq.
the class DeviceEventCallback method onDeviceAdded.
public void onDeviceAdded(String uuid) throws TestsigmaException, DeviceContainerException {
MobileDevice mobileDevice = iosDeviceListener.getMobileDevice(uuid);
mobileDevice.setIsOnline(true);
mobileDevice.setIsEmulator(false);
iosDeviceListener.addDevice(mobileDevice);
}
Aggregations