Package org.openqa.selenium.htmlunit

Examples of org.openqa.selenium.htmlunit.HtmlUnitDriver$HtmlUnitTargetLocator


                configuration.getRemoteHubUrl(), configuration.getFilterAttributeNames(),
                configuration.getCrawlSpecificationReader().getWaitAfterEvent(),
                configuration.getCrawlSpecificationReader().getWaitAfterReloadUrl());

      case htmlunit:
        HtmlUnitDriver driverHtmlUnit = new HtmlUnitDriver(true);
        driverHtmlUnit.setProxy(configuration.getProxyConfiguration().getHostname(),
                configuration.getProxyConfiguration().getPort());

        return WebDriverBackedEmbeddedBrowser.withDriver(driverHtmlUnit, configuration
                .getFilterAttributeNames(), configuration.getCrawlSpecificationReader()
                .getWaitAfterEvent(), configuration.getCrawlSpecificationReader()
View Full Code Here


    } else if ("chrome".equalsIgnoreCase(browser)) {
      driver = new ChromeDriver();
    } else if ("safari".equalsIgnoreCase(browser)) {
      driver = new SafariDriver();
    } else if ("htmlUnit".equalsIgnoreCase(browser)) {
      driver = new HtmlUnitDriver();
    } else if ("htmlUnit+js".equalsIgnoreCase(browser)) {
      driver = new HtmlUnitDriver(true);
    } else if ("opera".equalsIgnoreCase(browser)) {
            driver = new OperaDriver();
        } else if ("opera-mobile-tablet".equalsIgnoreCase(browser)) {
            DesiredCapabilities capabilities = DesiredCapabilities.opera();
View Full Code Here

    else if ("htmlunit".equalsIgnoreCase(browser)) {
      DesiredCapabilities desiredCapabilities = DesiredCapabilities.htmlUnit();
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDSELECTIONERROR, true);
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDXPATHERROR, false);
      desiredCapabilities.setJavascriptEnabled(true);
      return new HtmlUnitDriver(desiredCapabilities);
    }
    else {
      return new FirefoxDriver();
    }
  }
View Full Code Here

    } else if (htmlUnit()) {
      DesiredCapabilities desiredCapabilities = DesiredCapabilities.htmlUnit();
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDSELECTIONERROR, true);
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDXPATHERROR, false);
      desiredCapabilities.setJavascriptEnabled(true);
      return new HtmlUnitDriver(desiredCapabilities);
    } else if (FIREFOX.equalsIgnoreCase(browser)) {
      return maximize(new FirefoxDriver());
    } else if (OPERA.equalsIgnoreCase(browser)) {
      return createInstanceOf("com.opera.core.systems.OperaDriver");
    } else if (PHANTOMJS.equals(browser)) {
View Full Code Here

    if (browser.indexOf(':') > -1) {
      // Use constants BrowserType.IE, BrowserType.FIREFOX, BrowserType.CHROME etc.
      String emulatedBrowser = browser.replaceFirst("htmlunit:(.*)", "$1");
      capabilities.setVersion(emulatedBrowser);
    }
    return new HtmlUnitDriver(capabilities);
  }
View Full Code Here

    if (browser.indexOf(':') > -1) {
      // Use constants BrowserType.IE, BrowserType.FIREFOX, BrowserType.CHROME etc.
      String emulatedBrowser = browser.replaceFirst("htmlunit:(.*)", "$1");
      capabilities.setVersion(emulatedBrowser);
    }
    return new HtmlUnitDriver(capabilities);
  }
View Full Code Here

    } else if (htmlUnit()) {
      DesiredCapabilities desiredCapabilities = DesiredCapabilities.htmlUnit();
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDSELECTIONERROR, true);
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDXPATHERROR, false);
      desiredCapabilities.setJavascriptEnabled(true);
      return new HtmlUnitDriver(desiredCapabilities);
    } else if (FIREFOX.equalsIgnoreCase(browser)) {
      return maximize(new FirefoxDriver());
    } else if (OPERA.equalsIgnoreCase(browser)) {
      return createInstanceOf("com.opera.core.systems.OperaDriver");
    } else if (PHANTOMJS.equals(browser)) {
View Full Code Here

    } else if (htmlUnit()) {
      DesiredCapabilities desiredCapabilities = DesiredCapabilities.htmlUnit();
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDSELECTIONERROR, true);
      desiredCapabilities.setCapability(HtmlUnitDriver.INVALIDXPATHERROR, false);
      desiredCapabilities.setJavascriptEnabled(true);
      return new HtmlUnitDriver(desiredCapabilities);
    } else if (FIREFOX.equalsIgnoreCase(browser)) {
      return maximize(new FirefoxDriver());
    } else if (OPERA.equalsIgnoreCase(browser)) {
      return createInstanceOf("com.opera.core.systems.OperaDriver");
    } else if (PHANTOMJS.equals(browser)) {
View Full Code Here

                configuration.getRemoteHubUrl(), configuration.getFilterAttributeNames(),
                configuration.getCrawlSpecificationReader().getWaitAfterEvent(),
                configuration.getCrawlSpecificationReader().getWaitAfterReloadUrl());

      case htmlunit:
        return WebDriverBackedEmbeddedBrowser.withDriver(new HtmlUnitDriver(true),
                configuration.getFilterAttributeNames(), configuration
                        .getCrawlSpecificationReader().getWaitAfterEvent(), configuration
                        .getCrawlSpecificationReader().getWaitAfterReloadUrl());

      case iphone:
View Full Code Here

  public static class HtmlUnitDriverHandler extends DriverHandler {
    @Override
    protected WebDriver createWebDriver() {
      boolean enableJavaScript = pc.get("ju-testing-ee.selenium.htmlUnit.enableJavascript", Boolean.class);
      return new HtmlUnitDriver(enableJavaScript);
    }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.htmlunit.HtmlUnitDriver$HtmlUnitTargetLocator

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.