Examples of HttpCommandExecutor


Examples of org.openqa.selenium.remote.HttpCommandExecutor

        try {
            RemoteWebDriver d = getRemoteDriver();
            if (d == null) {
                return null;
            }
            HttpCommandExecutor ce = (HttpCommandExecutor) d
                    .getCommandExecutor();
            String hostName = ce.getAddressOfRemoteServer().getHost();
            int port = ce.getAddressOfRemoteServer().getPort();
            HttpHost host = new HttpHost(hostName, port);
            DefaultHttpClient client = new DefaultHttpClient();
            URL sessionURL = new URL("http://" + hostName + ":" + port
                    + "/grid/api/testsession?session=" + d.getSessionId());
            BasicHttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest(
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

  protected void startSession(Capabilities desiredCapabilities, Capabilities requiredCapabilities) {
  }

  public AttachRemoteIOSDriver(URL url, SessionId session) {
    super(url, null);
    setCommandExecutor(new HttpCommandExecutor(url));
    setSessionId(session.toString());
  }
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

   */
  public static RemoteIOSDriver getIOSDriver(RemoteWebDriver driver) {
    if (!(driver.getCommandExecutor() instanceof HttpCommandExecutor)) {
      throw new WebDriverException("ios only supports http commandExecutor.");
    }
    HttpCommandExecutor e = (HttpCommandExecutor) driver.getCommandExecutor();
    RemoteIOSDriver
        attach =
        new AttachRemoteIOSDriver(e.getAddressOfRemoteServer(), driver.getSessionId());
    return attach;
  }
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

    } catch (MalformedURLException e) {
      LOGGER.error("The given hub url of the remote server is malformed can not continue!",
              e);
      return null;
    }
    HttpCommandExecutor executor = null;
    try {
      executor = new HttpCommandExecutor(url);
    } catch (Exception e) {
      // TODO Stefan; refactor this catch, this will definitely result in
      // NullPointers, why
      // not throw RuntimeExcption direct?
      LOGGER.error("Received unknown exception while creating the "
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

    } catch (MalformedURLException e) {
      LOGGER.error("The given hub url of the remote server is malformed can not continue!",
              e);
      return null;
    }
    HttpCommandExecutor executor = null;
    try {
      executor = new HttpCommandExecutor(url);
    } catch (Exception e) {
      // TODO Stefan; refactor this catch, this will definitely result in
      // NullPointers, why
      // not throw RuntimeExcption direct?
      LOGGER.error("Received unknown exception while creating the "
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

    }

    private ReusableRemoteWebDriver(URL remoteAddress, Capabilities desiredCapabilities, SessionId sessionId)
            throws UnableReuseSessionException {
        super();
        setCommandExecutor(new HttpCommandExecutor(remoteAddress));
        startClient();

        reuseSession(sessionId, desiredCapabilities);
        checkReusability();
    }
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

  private static final Logger log = Logger.getLogger(WebDriverLikeCommandExecutor.class.getName());

  public WebDriverLikeCommandExecutor(RemoteWebDriver driver) {
    URL remoteServer;
    if (driver.getCommandExecutor() instanceof HttpCommandExecutor) {
      HttpCommandExecutor exe = (HttpCommandExecutor) driver.getCommandExecutor();
      remoteServer = exe.getAddressOfRemoteServer();
    } else {
      throw new WebDriverException("ios driver only supports http commandExecutor.");
    }
    this.remoteURL = remoteServer;
    this.driver = driver;
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

    public void initialize() {
        URL url = null;
        WebDriver remoteWebDriver;
        try {
            url = createRemoteURL();
            remoteWebDriver = new ScreenshootingRemoteWebDriver(wrapCommandExecutor(new HttpCommandExecutor(url)), desiredCapabilities);
        } catch (Throwable e) {
            if (verbose) {
                System.err.println("*********** Remote WebDriver Initialization Failure ************");
                e.printStackTrace(System.err);
            }
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

    } catch (MalformedURLException e) {
      LOGGER.error("The given hub url of the remote server is malformed can not continue!",
              e);
      return null;
    }
    HttpCommandExecutor executor = null;
    try {
      executor = new HttpCommandExecutor(url);
    } catch (Exception e) {
      // TODO Stefan; refactor this catch, this will definitely result in
      // NullPointers, why
      // not throw RuntimeExcption direct?
      LOGGER.error("Received unknown exception while creating the "
View Full Code Here

Examples of org.openqa.selenium.remote.HttpCommandExecutor

  }

  public void start() throws IOException {
    lock.lock(connectTimeout);
    try {
      delegate = new HttpCommandExecutor(buildUrl(host, determineNextFreePort(profile.getPort())));
      String firefoxLogFile = System.getProperty("webdriver.firefox.logfile");
      File logFile = firefoxLogFile == null ? null : new File(firefoxLogFile);
      this.process.setOutputWatcher(new CircularOutputStream(logFile, bufferSize));

      profile.setPort(delegate.getAddressOfRemoteServer().getPort());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.