Package org.openqa.selenium

Examples of org.openqa.selenium.WebDriverBackedSelenium


    if (Config.inst().BROWSER.equals("htmlunit")) {
      System.out.println("Using HTMLUnit.");

      setDriver(new HtmlUnitDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("firefox")) {
      System.out.println("Using Firefox.");
      setDriver(new FirefoxDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

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

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

      System.out.println(getDriver().toString());
      selenium = new WebDriverBackedSelenium(getDriver(), 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) getDriver();
View Full Code Here


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

      driver = new HtmlUnitDriver();

      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("firefox")) {

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

      driver = new FirefoxDriver();
      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

      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;
View Full Code Here

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

      driver = new HtmlUnitDriver();

      selenium = new WebDriverBackedSelenium(driver, Config.TEAMMATES_URL);

    } else if (Config.BROWSER.equals("firefox")) {

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

      driver = new FirefoxDriver();
      selenium = new WebDriverBackedSelenium(driver, Config.TEAMMATES_URL);

    } else if (Config.BROWSER.equals("chrome")) {

      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.TEAMMATES_URL);

      /*
       * Chrome hack. Currently Chrome doesn't support confirm() yet.
       * http://code.google.com/p/selenium/issues/detail?id=27
       */
 
View Full Code Here

    this.baseurl = baseurl;
    driver = new FirefoxDriver();
    driver.get(baseurl);
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
    waiting(2000);
    selenium = new WebDriverBackedSelenium(driver, baseurl);

  }
View Full Code Here

     * {@link HtmlUnitDriver} case.
     *
     * @return The new {@link WebDriver} instance.
     */
    public Selenium create() {
        return new WebDriverBackedSelenium(new Supplier<WebDriver>() {
            public WebDriver get() {
                if (HtmlUnitDriver.class.isAssignableFrom(webDriverClass)) {
                    final DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
                    capabilities.setJavascriptEnabled(true);
                    return new HtmlUnitDriver(capabilities);
View Full Code Here

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

      driver = new HtmlUnitDriver();

      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("firefox")) {

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

      driver = new FirefoxDriver();
      selenium = new WebDriverBackedSelenium(driver, Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

      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;
View Full Code Here

   * {@link HtmlUnitDriver} case.
   *
   * @return The new {@link WebDriver} instance.
   */
  public Selenium create() {
    return new WebDriverBackedSelenium(new Supplier<WebDriver>() {
      public WebDriver get() {
        if (HtmlUnitDriver.class.isAssignableFrom(webDriverClass)) {
          return new HtmlUnitDriver(true);
        } else {
          try {
View Full Code Here

   * {@link HtmlUnitDriver} case.
   *
   * @return The new {@link WebDriver} instance.
   */
  public Selenium create() {
    return new WebDriverBackedSelenium(new Supplier<WebDriver>() {
      public WebDriver get() {
        if (HtmlUnitDriver.class.isAssignableFrom(webDriverClass)) {
          return new HtmlUnitDriver(true);
        } else {
          try {
View Full Code Here

    if (Config.inst().BROWSER.equals("htmlunit")) {
      System.out.println("Using HTMLUnit.");

      setDriver(new HtmlUnitDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("firefox")) {
      System.out.println("Using Firefox.");
      setDriver(new FirefoxDriver());
      selenium = new WebDriverBackedSelenium(getDriver(), Config.inst().TEAMMATES_URL);

    } else if (Config.inst().BROWSER.equals("chrome")) {

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

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

      System.out.println(getDriver().toString());
      selenium = new WebDriverBackedSelenium(getDriver(), 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) getDriver();
View Full Code Here

   * {@link HtmlUnitDriver} case.
   *
   * @return The new {@link WebDriver} instance.
   */
  public Selenium create() {
    return new WebDriverBackedSelenium(new Supplier<WebDriver>() {
      public WebDriver get() {
        if (HtmlUnitDriver.class.isAssignableFrom(webDriverClass)) {
                    final DesiredCapabilities capabilities = DesiredCapabilities.htmlUnit();
                    capabilities.setJavascriptEnabled(true);
          return new HtmlUnitDriver(capabilities);
View Full Code Here

TOP

Related Classes of org.openqa.selenium.WebDriverBackedSelenium

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.