Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.Capabilities


    int numberOfFieldsMatched = 0;
    Class<? extends WebDriver> bestMatch = null;

    for (Map.Entry<Capabilities, Class<? extends WebDriver>> entry : capabilitiesToDriver.entrySet()) {
      int count = 0;
      Capabilities caps = entry.getKey();
      if (matches(caps.getBrowserName(), desired.getBrowserName())) {
        count++;
      }
      if (matches(caps.getVersion(), desired.getVersion())) {
        count++;
      }
      if (caps.isJavascriptEnabled() == desired.isJavascriptEnabled()) {
        count++;
      }
      Platform capPlatform = caps.getPlatform();
      Platform desiredPlatform = desired.getPlatform();

      if (capPlatform != null && desiredPlatform != null) {
        if (capPlatform.is(desiredPlatform)) {
          count++;
View Full Code Here


  public void testShouldBeAbleToRegisterOwnDriver() {
    DriverFactory factory = new DriverFactory();
    DriverSessions sessions = new DriverSessions(Platform.VISTA, factory);

    Capabilities capabilities = new DesiredCapabilities("foo", "1", Platform.ANY);
    sessions.registerDriver(capabilities, AbstractDriver.class);

    assertTrue(factory.hasMappingFor(capabilities));
  }
View Full Code Here

    registerDefaults(runningOn);
  }

  private void registerDefaults(Platform current) {
    for (Map.Entry<Capabilities, String> entry : defaultDrivers.entrySet()) {
      Capabilities caps = entry.getKey();
      if (caps.getPlatform() != null && caps.getPlatform().is(current)) {
        registerDriver(caps, entry.getValue());
      } else if (caps.getPlatform() == null) {
        registerDriver(caps, entry.getValue());
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.Capabilities

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.