use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class ChromeDriver 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 (ChromeOptions.CAPABILITY.equals(name)) {
String values = singleCap.getCapabilityValue().toString();
Map<String, Object> option = parseCapabilities(values, "ChromeOptions");
if (option.get("args") != null) {
List<Object> list = (List<Object>) option.get("args");
for (Object str : list) {
chromeOptions.addArguments(str.toString());
}
}
if (option.get("extensions") != null) {
List<Object> list = (List<Object>) option.get("extensions");
for (Object str : list) {
chromeOptions.addExtensions(new File(str.toString()));
}
}
if (option.get("mobileEmulation") != null) {
Map<String, Object> mobileEmulation = (Map<String, Object>) option.get("mobileEmulation");
chromeOptions.setExperimentalOption("mobileEmulation", mobileEmulation);
}
if (option.get("prefs") != null) {
Map<String, Object> prefs = (Map<String, Object>) option.get("prefs");
chromeOptions.setExperimentalOption("prefs", prefs);
}
if (option.get("binary") != null) {
List<Object> list = (List<Object>) option.get("binary");
for (Object str : list) {
chromeOptions.setBinary(str.toString());
}
}
single.remove();
}
}
}
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class FirefoxDriver method setAdditionalCapabilities.
protected void setAdditionalCapabilities(List<WebDriverCapability> additionalCapabilitiesList) {
if (additionalCapabilitiesList != null) {
for (WebDriverCapability capability : additionalCapabilitiesList) {
String name = capability.getCapabilityName();
capabilities.add(new WebDriverCapability(name, capability.getCapabilityValue()));
}
}
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class WebDriver method checkForLocationCapability.
protected void checkForLocationCapability(List<WebDriverCapability> additionalCapabilitiesList) {
if (additionalCapabilitiesList != null) {
for (Iterator<WebDriverCapability> single = additionalCapabilitiesList.listIterator(); single.hasNext(); ) {
WebDriverCapability capability = single.next();
String name = capability.getCapabilityName();
if (com.testsigma.automator.constants.DesiredCapabilities.GEOLOCATION.equals(name)) {
single.remove();
locationCapability = new WebDriverCapability(name, capability.getCapabilityValue());
}
}
}
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class AndroidWebDriver method setHybridCapabilities.
@Override
protected void setHybridCapabilities() throws AutomatorException, MalformedURLException {
super.setHybridCapabilities();
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("w3c", false);
capabilities.add(new WebDriverCapability("nativeWebScreenshot", Boolean.TRUE));
if (settings.getChromedriverExecutableDir() != null) {
capabilities.add(new WebDriverCapability(TSCapabilityType.CHROME_DRIVER_EXECUTABLE_DIR, settings.getChromedriverExecutableDir()));
}
capabilities.add(new WebDriverCapability(ChromeOptions.CAPABILITY, options));
capabilities.add(new WebDriverCapability(AndroidMobileCapabilityType.UNICODE_KEYBOARD, Boolean.TRUE));
capabilities.add(new WebDriverCapability(AndroidMobileCapabilityType.RESET_KEYBOARD, Boolean.TRUE));
}
use of com.testsigma.automator.drivers.WebDriverCapability in project testsigma by testsigmahq.
the class IosDriver method setCommonCapabilities.
@Override
protected void setCommonCapabilities() throws AutomatorException {
super.setCommonCapabilities();
capabilities.add(new WebDriverCapability(MobileCapabilityType.PLATFORM_NAME, Platform.iOS.name()));
}
Aggregations