Search in sources :

Example 1 with Browsers

use of com.testsigma.automator.entity.Browsers 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)

Aggregations

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