Search in sources :

Example 1 with DriversUpdateService

use of com.testsigma.automator.drivers.DriversUpdateService in project testsigma by testsigmahq.

the class DeviceContainer method syncBrowserDrivers.

public void syncBrowserDrivers(MobileDevice mobileDevice) {
    log.info("Syncing Browser Drivers For Mobile Devices - " + mobileDevice);
    List<AgentBrowser> browserList = mobileDevice.getBrowserList();
    if (browserList == null) {
        return;
    }
    for (AgentBrowser browserObj : browserList) {
        try {
            log.info("Trying to sync driver for mobile browser - " + browserObj);
            OsBrowserType browserType = browserObj.getName();
            String browserVersion = browserObj.getMajorVersion() + "";
            Browsers browser = OsBrowserType.getBrowserType(browserType);
            String driverPath = AutomatorConfig.getInstance().getAppBridge().getDriverExecutablePath(browser.getKey(), browserVersion);
            new DriversUpdateService().syncBrowserDriver(browserType, browserVersion, driverPath);
        } catch (AutomatorException e) {
            log.error(e.getMessage(), e);
        }
    }
}
Also used : AutomatorException(com.testsigma.automator.exceptions.AutomatorException) AgentBrowser(com.testsigma.agent.browsers.AgentBrowser) Browsers(com.testsigma.automator.entity.Browsers) DriversUpdateService(com.testsigma.automator.drivers.DriversUpdateService) OsBrowserType(com.testsigma.automator.entity.OsBrowserType)

Example 2 with DriversUpdateService

use of com.testsigma.automator.drivers.DriversUpdateService in project testsigma by testsigmahq.

the class EnvironmentRunner method beforeExecute.

protected void beforeExecute() throws AutomatorException {
    checkForEmptyEnvironment();
    new ScreenCaptureUtil().createScreenshotsFolder();
    new ErrorUtil().checkError(testDeviceEntity.getErrorCode(), null);
    new DriversUpdateService().syncBrowserDriver(testDeviceEntity);
}
Also used : ScreenCaptureUtil(com.testsigma.automator.utilities.ScreenCaptureUtil) DriversUpdateService(com.testsigma.automator.drivers.DriversUpdateService) ErrorUtil(com.testsigma.automator.utilities.ErrorUtil)

Aggregations

DriversUpdateService (com.testsigma.automator.drivers.DriversUpdateService)2 AgentBrowser (com.testsigma.agent.browsers.AgentBrowser)1 Browsers (com.testsigma.automator.entity.Browsers)1 OsBrowserType (com.testsigma.automator.entity.OsBrowserType)1 AutomatorException (com.testsigma.automator.exceptions.AutomatorException)1 ErrorUtil (com.testsigma.automator.utilities.ErrorUtil)1 ScreenCaptureUtil (com.testsigma.automator.utilities.ScreenCaptureUtil)1