From 978d81bfdc179d431ad1927d99a884329dc3a7ac Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Thu, 25 Jul 2019 08:57:15 +0200 Subject: [PATCH] Using htmlunit webdriver --- basicTests.java | 7 +++++-- pom.xml | 16 +++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/basicTests.java b/basicTests.java index 62c60bc..bd757a8 100644 --- a/basicTests.java +++ b/basicTests.java @@ -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"); diff --git a/pom.xml b/pom.xml index 4cff92c..ac0c391 100644 --- a/pom.xml +++ b/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"> 4.0.0 - MySel20Proj - MySel20Proj + FreDLUiTests + FreDLUiTests 1.0 org.seleniumhq.selenium selenium-server - 3.0.1 + 3.141.59 + + + org.seleniumhq.selenium + selenium-java + 3.141.59 + + + org.seleniumhq.selenium + htmlunit-driver + 2.33.2