use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class IosDriver method setHybridCapabilities.
@Override
protected void setHybridCapabilities() throws AutomatorException, MalformedURLException {
super.setHybridCapabilities();
AppPathType appPathType = settings.getAppPathType();
if (appPathType == AppPathType.APP_DETAILS) {
capabilities.add(new WebDriverCapability(TSCapabilityType.BUNDLE_ID, settings.getBundleId()));
}
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class IosWebDriver method setCommonCapabilities.
@Override
protected void setCommonCapabilities() throws AutomatorException {
super.setCommonCapabilities();
capabilities.add(new WebDriverCapability(MobileCapabilityType.PLATFORM_NAME, Platform.iOS.name()));
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class MobileDriver method setHybridCapabilities.
@Override
protected void setHybridCapabilities() throws AutomatorException, MalformedURLException {
super.setHybridCapabilities();
setHybridRemoteServerUrl(settings.getAppiumUrl());
if (WorkspaceType.isIOSNative(testDeviceEntity.getWorkspaceType()) && (AppPathType.APP_DETAILS != settings.getAppPathType())) {
log.info("Identified Application type is iOS Native and app path type is not using bundleID. Trying to resolve" + "bundle Id");
List<WebDriverCapability> additionalCapabilitiesList = webDriverSettings.getWebDriverCapabilities();
WebDriverCapability appCapability = additionalCapabilitiesList.stream().filter(cap -> cap.getCapabilityName().equals(TSCapabilityType.APP)).findFirst().orElse(null);
if ((appCapability != null) && StringUtils.isNotBlank(appCapability.getCapabilityValue().toString())) {
AppInstaller appInstaller = new AppInstaller(EnvironmentRunner.getWebAppHttpClient());
String bundleId = appInstaller.installApp(settings.getDeviceName(), settings.getDeviceUniqueId(), appCapability.getCapabilityValue().toString());
log.info("Bundle Id From Installed Application - " + bundleId);
settings.setBundleId(bundleId);
}
}
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class MobileDriver method setCommonCapabilities.
@Override
protected void setCommonCapabilities() throws AutomatorException {
super.setCommonCapabilities();
capabilities.add(new WebDriverCapability(TSCapabilityType.NAME, executionName));
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class FirefoxDriver method setBrowserSpecificCapabilities.
@Override
protected void setBrowserSpecificCapabilities(List<WebDriverCapability> additionalCapabilitiesList) throws AutomatorException {
if (additionalCapabilitiesList != null) {
for (Iterator<WebDriverCapability> single = additionalCapabilitiesList.listIterator(); single.hasNext(); ) {
WebDriverCapability singleCap = single.next();
String name = singleCap.getCapabilityName();
if (com.testsigma.automator.constants.DesiredCapabilities.FIREFOXPROFILE.equals(name)) {
FirefoxProfile profile = new FirefoxProfile();
String values = singleCap.getCapabilityValue().toString();
Map<String, Object> profiles = parseCapabilities(values, TSCapabilityType.FIREFOX_PROFILE);
for (Map.Entry<String, Object> pro : profiles.entrySet()) {
if (pro.getValue() instanceof Boolean) {
profile.setPreference(pro.getKey(), (Boolean) pro.getValue());
} else if (pro.getValue() instanceof Integer) {
profile.setPreference(pro.getKey(), (Integer) pro.getValue());
} else {
profile.setPreference(pro.getKey(), (String) pro.getValue());
}
}
capabilities.add(new WebDriverCapability(org.openqa.selenium.firefox.FirefoxDriver.PROFILE, profile));
single.remove();
}
}
}
}
Aggregations