Package org.openqa.selenium.htmlunit

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


   

    @Before
    public final void initWebDriver()
    {
        final HtmlUnitDriver unitDriver = new HtmlUnitDriver();
       
        this.webDriver = unitDriver;
    }
View Full Code Here


   

    @Before
    public final void initWebDriver()
    {
        final HtmlUnitDriver unitDriver = new HtmlUnitDriver();
       
        this.webDriver = unitDriver;
    }
View Full Code Here


    @Before
    public final void initWebDriver()
    {
        final HtmlUnitDriver unitDriver = new HtmlUnitDriver();

        this.webDriver = unitDriver;
    }
View Full Code Here

                System.setProperty("webdriver.chrome.driver", TEST_CLASSES_PATH + "//chromedriver");
                return new ChromeDriver();
            case OPERA:
                return new OperaDriver();
            case HTMLUNIT:
                return new HtmlUnitDriver();
            default:
                throw new UnknownBrowserException("Cannot create driver for unknown browser type");
        }
    }
View Full Code Here

    if (Config.inst().BROWSER.equals("htmlunit")) {

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

      driver = new HtmlUnitDriver();

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

    } else if (Config.inst().BROWSER.equals("firefox")) {
View Full Code Here

public class AcceptanceTest {
  public static final String SUITE = "acceptance";
  public static final String BASE_URL = "http://localhost:4040/sitebricks";

  public static WebDriver createWebDriver() {
    return new HtmlUnitDriver();
  }
View Full Code Here

    }

    @Override
    protected WebDriver createDriver() {
        if (webDriver == null) {
            webDriver = new HtmlUnitDriver() {
                @Override
                protected WebClient modifyWebClient(WebClient webClient) {
                    WebClient answer = super.modifyWebClient(webClient);
                    answer.addRequestHeader("Accept", "text/html");
                    answer.getCookieManager().setCookiesEnabled(true);
View Full Code Here

    protected FirefoxDriver createFirefoxDriver() {
        return new FirefoxDriver();
    }

    protected WebDriver createHtmlUnitDriver() {
        HtmlUnitDriver driver = new HtmlUnitDriver();
        boolean javascriptEnabled = parseBoolean(System.getProperty("webdriver.htmlunit.javascriptEnabled", "true"));
        driver.setJavascriptEnabled(javascriptEnabled);
        return driver;
    }
View Full Code Here

          WebDriver driver = null;
         
          logger.debug("Creating driver: " + driverType);
          if ("HtmlUnit".equals(driverType)) {
            boolean enableJavaScript = pc.get("ju-testing-ee.selenium.htmlUnit.enableJavascript", Boolean.class);
            driver = new HtmlUnitDriver(enableJavaScript);
          } else if ("Chrome".equals(driverType)) {
            System.setProperty("webdriver.chrome.driver", DriverRule.getChromeDriverExePath().toAbsolutePath().toString());
                driver = new ChromeDriver();
          } else {
            throw new JuRuntimeException(String.format("Unsupported selenium driver type: %s. Check value of property %s"
View Full Code Here

   */
  public Selenium create() {
    return new WebDriverBackedSelenium(new Supplier<WebDriver>() {
      public WebDriver get() {
        if (HtmlUnitDriver.class.isAssignableFrom(webDriverClass)) {
          return new HtmlUnitDriver(true);
        } else {
          try {
            return webDriverClass.newInstance();
          } catch (Exception e) {
            return null;
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.