Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions


            desiredCapabilities.setCapability(dc.getKey(), dc.getValue());
        }
       
        try {
           
            WebDriver driver = new RemoteWebDriver(new URL(gridUrl), desiredCapabilities);
            WebDriver augmentedDriver = new Augmenter().augment(driver);
          return new SeleniumBrowser(augmentedDriver);
        }
        catch (Exception ex) {
          throw new RuntimeException(ex);
View Full Code Here


            }
        } else {
            throw new IllegalArgumentException("Require --remote-url to know where to connect to");
        }
        caps.merge(driverOptions.getCapabilities());
        RemoteWebDriver driver = new AppiumDriver(url, caps);
        log.info("Session ID: " + driver.getSessionId());
        return driver;
    }
View Full Code Here

            }
        } else {
            throw new IllegalArgumentException("Require --remote-url to know where to connect to");
        }
        log.info("Remote URL: {}", url);
        RemoteWebDriver driver = new RemoteWebDriver(url, caps);
        log.info("Session ID: " + driver.getSessionId());
        setInitialWindowSize(driver, driverOptions);
        return driver;
    }
View Full Code Here

        capabilities.setCapability("platform",    readPropertyOrEnv("SELENIUM_PLATFORM", "mac"));
        capabilities.setCapability("browserName", readPropertyOrEnv("SELENIUM_BROWSER", BrowserType.CHROME));

        capabilities.setCapability("name",        fullTestName());

        return new RemoteWebDriver(
            new URL(String.format("http://%s:%s@%s:%s/wd/hub",
                    authentication.getUsername(),
                    authentication.getAccessKey(),
                    readPropertyOrEnv("SELENIUM_HOST", "localhost"),
                    readPropertyOrEnv("SELENIUM_PORT", "4445"))
View Full Code Here

     * Augments the instance
     */
    @Override
    public RemoteWebDriver enhance(RemoteWebDriver instance, Class<? extends Annotation> qualifier) {

        RemoteWebDriver enhanced = (RemoteWebDriver) augmenter.augment(instance);
        return enhanced;
    }
View Full Code Here

    @Override
    public RemoteWebDriver deenhance(RemoteWebDriver enhancedInstance, Class<? extends Annotation> qualifier) {

        if (enhancedInstance instanceof DroneAugmented) {

            RemoteWebDriver original = (RemoteWebDriver) ((DroneAugmented) enhancedInstance).getWrapped();

            Capabilities capabilities = enhancedInstance.getCapabilities();

            if (capabilities != null) {
                ((DesiredCapabilities) enhancedInstance.getCapabilities()).setCapability(DRONE_AUGMENTED, Boolean.FALSE);
View Full Code Here

          .usingDriverExecutable(
              new File(props.getProperty("browserDriverPath")))
          .usingAnyFreePort().build();
      service.start();
      // createDriver
      driver = new RemoteWebDriver(service.getUrl(),
          DesiredCapabilities.chrome());
    }
  }
View Full Code Here

      System.out.println("Using Chrome");

      // Use technique here:
      // http://code.google.com/p/selenium/wiki/ChromeDriver
      ChromeDriverService service = startChromeDriverService();
      driver = new RemoteWebDriver(service.getUrl(), DesiredCapabilities.chrome());

      System.out.println(driver.toString());
      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

      /*
       * Chrome hack. Currently Chrome doesn't support confirm() yet. http://code.google.com/p/selenium/issues/detail?id=27
       */
      JavascriptExecutor js = (JavascriptExecutor) driver;
      js.executeScript("window.confirm = function(msg){ return true;};");

    } else {

      System.out.println("Using " + Config.inst().BROWSER);

      // iexplore, opera, safari. For some not-supported-yet browsers, we
      // use
      // legacy methods: Going through the RC server.
      String selBrowserIdentifierString = "*" + Config.inst().BROWSER;

      selenium = new DefaultSelenium("localhost", 4444, selBrowserIdentifierString, Config.inst().TEAMMATES_URL);
      CommandExecutor executor = new SeleneseCommandExecutor(selenium);
      DesiredCapabilities dc = new DesiredCapabilities();
      driver = new RemoteWebDriver(executor, dc);

    }

    selenium.windowMaximize();
    selenium.open("/");
View Full Code Here

      // not throw RuntimeExcption direct?
      LOGGER.error("Received unknown exception while creating the "
              + "HttpCommandExecutor, can not continue!", e);
      return null;
    }
    return new RemoteWebDriver(executor, capabilities);
  }
View Full Code Here

      if (IE.equals(driverType)) {
        cap = DesiredCapabilities.internetExplorer();
      }

      driver = new RemoteWebDriver(new URL("http://" + remoteHost + ":" + remotePort + "/wd"), cap);
    }

    Assert.notNull(driver, "No driver could be found by name:" + driverName);

    return driver;
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions

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.