Package org.openqa.selenium.remote

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


  protected WebDriver createRemoteDriver(String remote, String browser) {
    try {
      DesiredCapabilities capabilities = new DesiredCapabilities();
      capabilities.setBrowserName(browser);
      return new RemoteWebDriver(new URL(remote), capabilities);
    } catch (MalformedURLException e) {
      throw new IllegalArgumentException("Invalid 'remote' parameter: " + remote, e);
    }
  }
View Full Code Here


    if (!version.equalsIgnoreCase("local")) {
      // Grid Amazon-Pixeon
      // driver = new RemoteWebDriver(new
      // URL("http://10.8.0.6:4444/wd/hub"), caps);
      // Grid Local-Pixeon
      driver = new RemoteWebDriver(new URL(
          "http://10.10.1.121:4444/wd/hub"), caps);
    }
   
    driver.get(Util.URL);
   
View Full Code Here

      break;
    }

    if(!version.equalsIgnoreCase("local")){
      System.out.println("-->>> IP Selenium Server: " + Util.IP_SELENIUM_SERVER);
      driver = new RemoteWebDriver(new URL("http://"+Util.IP_SELENIUM_SERVER+ ":4444/wd/hub"), caps);     
    }

    driver.get(Util.URL);
    driver.manage().window().maximize();
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

  /**
   * First try to create phantomJS. If that fails, try Chrome.
   */
  public RemoteWebDriver newBrowser() {
    RemoteWebDriver driver;
    switch (getBrowserType()) {
      case FIREFOX:
        driver = new FirefoxDriver();
        break;
      case INTERNET_EXPLORER:
        driver = new InternetExplorerDriver();
        break;
      case CHROME:
        driver = new ChromeDriver();
        break;
      case PHANTOMJS:
        driver = new PhantomJSDriver();
        break;
      default:
        throw new IllegalStateException("Unsupported browsertype " + getBrowserType());
    }

    driver.manage()
          .timeouts()
          .implicitlyWait(5, TimeUnit.SECONDS)
          .pageLoadTimeout(30, TimeUnit.SECONDS)
          .setScriptTimeout(30, TimeUnit.SECONDS);

    driver.manage()
          .deleteAllCookies();

    return driver;
  }
View Full Code Here

  private static WebDriver createRemoteDriver(String remote, String browser) {
    try {
      DesiredCapabilities capabilities = new DesiredCapabilities();
      capabilities.setBrowserName(browser);
      return new RemoteWebDriver(new URL(remote), capabilities);
    } catch (MalformedURLException e) {
      throw new IllegalArgumentException("Invalid 'remote' parameter: " + remote, e);
    }
  }
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

   *
   * @return a fresh RemoteWebDriver instance
   * @throws RuntimeException in case of any error
   */
  public WebDriver get() {
    return new Augmenter().augment(new RemoteWebDriver(getRemote(), getCapabilities()));
  }
View Full Code Here

      } else if (BrowserType.chrome.name().equals(driverType)) {
        cap = DesiredCapabilities.chrome();
      }

      try {
        driver = new RemoteWebDriver(new URL(remoteUrl), cap);
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

  private static WebDriver createRemoteDriver(String remote, String browser) {
    try {
      DesiredCapabilities capabilities = new DesiredCapabilities();
      capabilities.setBrowserName(browser);
      return new RemoteWebDriver(new URL(remote), capabilities);
    } catch (MalformedURLException e) {
      throw new IllegalArgumentException("Invalid 'remote' parameter: " + remote, e);
    }
  }
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.