Using htmlunit webdriver
This commit is contained in:
@@ -3,7 +3,8 @@ package org.openqa.selenium.example;
|
||||
import org.openqa.selenium.By;
|
||||
import org.openqa.selenium.WebDriver;
|
||||
import org.openqa.selenium.WebElement;
|
||||
import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
//import org.openqa.selenium.firefox.FirefoxDriver;
|
||||
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
|
||||
import org.openqa.selenium.support.ui.ExpectedCondition;
|
||||
import org.openqa.selenium.support.ui.WebDriverWait;
|
||||
|
||||
@@ -12,7 +13,9 @@ public class Selenium2Example {
|
||||
// Create a new instance of the Firefox driver
|
||||
// Notice that the remainder of the code relies on the interface,
|
||||
// not the implementation.
|
||||
WebDriver driver = new FirefoxDriver();
|
||||
//WebDriver driver = new FirefoxDriver();
|
||||
//WebDriver driver = new RemoteWebDriver(new URL("http://jenkins.fredldev.fremo-net.eu:4444/wd/hub"), capability);
|
||||
WebDriver driver = new HtmlUnitDriver(true);
|
||||
|
||||
// And now use this to visit Google
|
||||
driver.get("http://www.google.com");
|
||||
|
||||
Reference in New Issue
Block a user