Setup Edge webdriver

        :param capabilities: capabilities object
        :returns: a new local Edge driver
333804
def _setup_edge(self, capabilities):
        
        edge_driver = self.config.get('Driver', 'edge_driver_path')
        self.logger.debug("Edge driver path given in properties: %s", edge_driver)
        return webdriver.Edge(edge_driver, capabilities=capabilities)
48378
def add_edge_set_configuration(self, param_name, edge_to_value):
        
        for edge, val in future.utils.iteritems(edge_to_value):
            self.add_edge_configuration(param_name, edge, val)
722004
public WebDriver setupDriver() throws InvalidBrowserException {
        WebDriver driver;
        // check the browser
        switch (browser.getName()) {
            case HTMLUNIT:
                System.getProperties().put("org.apache.commons.logging.simplelog.defaultlog", "fatal");
                java.util.logging.Logger.getLogger("com.gargoylesoftware.htmlunit").setLevel(Level.OFF);
                java.util.logging.Logger.getLogger("org.apache.http").setLevel(Level.OFF);
                driver = new HtmlUnitDriver(desiredCapabilities);
                break;
            case FIREFOX:
                WebDriverManager.firefoxdriver().forceCache().setup();
                FirefoxOptions firefoxOptions = new FirefoxOptions(desiredCapabilities);
                firefoxOptions.addArguments(getBrowserOptions());
                if (Property.runHeadless()) {
                    firefoxOptions.setHeadless(true);
                }
                driver = new FirefoxDriver(firefoxOptions);
                break;
            case CHROME:
                WebDriverManager.chromedriver().forceCache().setup();
                ChromeOptions chromeOptions = new ChromeOptions();
                chromeOptions = chromeOptions.merge(desiredCapabilities);
                chromeOptions.addArguments(getBrowserOptions());
                if (Property.runHeadless()) {
                    chromeOptions.setHeadless(true);
                }
                driver = new ChromeDriver(chromeOptions);
                break;
            case INTERNETEXPLORER:
                WebDriverManager.iedriver().forceCache().setup();
                InternetExplorerOptions internetExplorerOptions = new InternetExplorerOptions(desiredCapabilities);
                driver = new InternetExplorerDriver(internetExplorerOptions);
                break;
            case EDGE:
                WebDriverManager.edgedriver().forceCache().setup();
                EdgeOptions edgeOptions = new EdgeOptions();
                edgeOptions = edgeOptions.merge(desiredCapabilities);
                driver = new EdgeDriver(edgeOptions);
                break;
            case SAFARI:
                SafariOptions safariOptions = new SafariOptions(desiredCapabilities);
                driver = new SafariDriver(safariOptions);
                break;
            case OPERA:
                WebDriverManager.operadriver().forceCache().setup();
                OperaOptions operaOptions = new OperaOptions();
                operaOptions = operaOptions.merge(desiredCapabilities);
                driver = new OperaDriver(operaOptions);
                break;
            case PHANTOMJS:
                WebDriverManager.phantomjs().forceCache().setup();
                driver = new PhantomJSDriver(desiredCapabilities);
                break;
            // if the browser is not listed, throw an error
            default:
                throw new InvalidBrowserException(
                        "The selected browser " + browser.getName() + " is not an applicable choice");
        }
        return driver;
    }
377475
def _apply_dvs_capability(capability_spec, capability_dict):
    '''
    
    '''
    if 'operation_supported' in capability_dict:
        capability_spec.dvsOperationSupported = \
                capability_dict['operation_supported']
    if 'port_operation_supported' in capability_dict:
        capability_spec.dvPortOperationSupported = \
                capability_dict['port_operation_supported']
    if 'portgroup_operation_supported' in capability_dict:
        capability_spec.dvPortGroupOperationSupported = \
                capability_dict['portgroup_operation_supported']
6184
def build(capabilities, device_handler):
        ""
        if device_handler:
            # This is used as kwargs dictionary for lxml's Element() function.
            # Therefore the arg-name ("nsmap") is used as key here.
            xml_namespace_kwargs = { "nsmap" : device_handler.get_xml_base_namespace_dict() }
        else:
            xml_namespace_kwargs = {}
        hello = new_ele("hello", **xml_namespace_kwargs)
        caps = sub_ele(hello, "capabilities")
        def fun(uri): sub_ele(caps, "capability").text = uri
        #python3 changes
        if sys.version < '3':
            map(fun, capabilities)
        else:
            list(map(fun, capabilities))
        return to_xml(hello)
1225543
public static NewAppiumSessionPayload create(Capabilities caps) throws IOException {
        boolean forceMobileJSONWP =
                ofNullable(caps.getCapability(FORCE_MJSONWP))
                .map(o -> Boolean.class.isAssignableFrom(o.getClass()) && Boolean.class.cast(o))
                .orElse(false);

        HashMap<String, ?> capabilityMap = new HashMap<>(caps.asMap());
        capabilityMap.remove(FORCE_MJSONWP);
        Map<String, ?> source = of(DESIRED_CAPABILITIES, capabilityMap);
        String json = new Json().toJson(source);
        return new NewAppiumSessionPayload(new StringReader(json), forceMobileJSONWP);
    }
1257210
def _create_driver(self, **kwargs):
        
        if self.driver is None:
            self.driver = self.create_driver(**kwargs)
            self.init_driver_func(self.driver)
1163785
def add_edge(self, source, target):
    
    edge = Edge(len(self.edges))
    self.edges.append(edge)
    source.out_edges.append(edge.idx)
    target.in_edges.append(edge.idx)
    edge.source = source.idx
    edge.target = target.idx
    return edge
1001664
def get_server_capabilities(self):
        
        capabilities = {}
        data = self.get_host_health_data()
        ilo_firmware = self._get_ilo_firmware_version(data)
        if ilo_firmware:
            capabilities.update(ilo_firmware)
        rom_firmware = self._get_rom_firmware_version(data)
        if rom_firmware:
            capabilities.update(rom_firmware)
        capabilities.update({'server_model': self.get_product_name()})
        capabilities.update(self._get_number_of_gpu_devices_connected(data))
        boot_modes = common.get_supported_boot_modes(
            self.get_supported_boot_mode())
        capabilities.update({
            'boot_mode_bios': boot_modes.boot_mode_bios,
            'boot_mode_uefi': boot_modes.boot_mode_uefi})
        return capabilities
828654
def get_driver_platform(self):
        
        platform = ''
        if 'platform' in self.driver.desired_capabilities:
            platform = self.driver.desired_capabilities['platform']
        elif 'platformName' in self.driver.desired_capabilities:
            platform = self.driver.desired_capabilities['platformName']
        return platform
1089190
def driver(self):
        """"""
        from dallinger.config import get_config

        config = get_config()
        if not config.ready:
            config.load()
        driver_url = config.get("webdriver_url", None)
        driver_type = config.get("webdriver_type")
        driver = None

        if driver_url:
            capabilities = CAPABILITY_MAP.get(driver_type.lower())
            if capabilities is None:
                raise ValueError(
                    "Unsupported remote webdriver_type: {}".format(driver_type)
                )
            driver = webdriver.Remote(
                desired_capabilities=capabilities, command_executor=driver_url
            )
        else:
            driver_class = DRIVER_MAP.get(driver_type.lower())
            if driver_class is not None:
                driver = driver_class()

        if driver is None:
            raise ValueError("Unsupported webdriver_type: {}".format(driver_type))

        driver.set_window_size(1024, 768)
        logger.info("Created {} webdriver.".format(driver_type))
        return driver
20569
def add_edge_configuration(self, param_name, edge, param_value):
        
        if param_name not in self.config['edges']:
            self.config['edges'][param_name] = {edge: param_value}
        else:
            self.config['edges'][param_name][edge] = param_value
816014
public void setCapabilities(java.util.Collection<String> capabilities) {
        if (capabilities == null) {
            this.capabilities = null;
            return;
        }

        this.capabilities = new com.amazonaws.internal.SdkInternalList<String>(capabilities);
    }
1070737
def has_capabilities(self, *cap_names):
		
		for name in cap_names:
			if name not in self.__class_capabilities__:
				return False
		return True
408038
private static void addSpecificBrowserSettings(
			final DesiredCapabilities capabilities, final Builder builder) {
		if (capabilities.getBrowserName().equalsIgnoreCase(
				Constants.Browsers.FIREFOX)) {
			LOG.info("Browser is Firefox. Getting local profile");

			FirefoxProfile profile = null;

			if (builder.profileLocation != null
					&& !"".equalsIgnoreCase(builder.profileLocation)) {
				profile = new FirefoxProfile(new File(builder.profileLocation));
				LOG.info("Firefox profile: " + builder.profileLocation);
			} else {
				LOG.info("Loading Firefox default sprofile");
				ProfilesIni allProfiles = new ProfilesIni();
				allProfiles.getProfile("default");
			}

			capabilities.setCapability(FirefoxDriver.PROFILE, profile);

			if (builder.userAgent != null) {
				profile.setPreference("general.useragent.override",
						builder.userAgent);
			}

		} else if (capabilities.getBrowserName().equalsIgnoreCase(
				Constants.Browsers.CHROME)) {
			ChromeOptions options = new ChromeOptions();
			if (builder.userAgent != null) {
				options.addArguments("user-agent=" + builder.userAgent);
			}
			capabilities.setCapability(ChromeOptions.CAPABILITY, options);
		} else if (capabilities.getBrowserName().equalsIgnoreCase(
				Constants.Browsers.IE)) {
			capabilities
					.setCapability(
							InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,
							builder.flakinessForIe);
		}
		LOG.info("Finished adding specific browser settings");
	}
316851
def device_capability_types
      # Capabilities are appended to the bos header
      ptr = pointer + offset_of(:dev_capability)
      bNumDeviceCaps.times.map do
        cap = DeviceCapability.new self, ptr.read_pointer
        ptr += FFI.type_size(:pointer)
        Call::BosTypes.find cap.bDevCapabilityType
      end
    end
1130260
function(capability, specLists) {
  this.capability = capability;
  this.numRunningInstances = 0;
  this.maxInstance = capability.maxInstances || 1;
  this.specsIndex = 0;
  this.specLists = specLists;
}