Using htmlunit webdriver
This commit is contained in:
parent
ca010b7b25
commit
978d81bfdc
|
@ -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");
|
||||
|
|
16
pom.xml
16
pom.xml
|
@ -3,14 +3,24 @@
|
|||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>MySel20Proj</groupId>
|
||||
<artifactId>MySel20Proj</artifactId>
|
||||
<groupId>FreDLUiTests</groupId>
|
||||
<artifactId>FreDLUiTests</artifactId>
|
||||
<version>1.0</version>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-server</artifactId>
|
||||
<version>3.0.1</version>
|
||||
<version>3.141.59</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>selenium-java</artifactId>
|
||||
<version>3.141.59</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.seleniumhq.selenium</groupId>
|
||||
<artifactId>htmlunit-driver</artifactId>
|
||||
<version>2.33.2</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
Loading…
Reference in New Issue