From 64a234b3a43aa5724d317bb603f4665528461fda Mon Sep 17 00:00:00 2001 From: Tim Jacomb Date: Mon, 5 Jun 2023 16:15:29 +0100 Subject: [PATCH] Upgrade HtmlUnit from 2.x to 3.x --- pom.xml | 2 +- src/test/java/hudson/tools/JDKInstallerTest.java | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8ff0d3b..b7ed8e1 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jenkins-ci.plugins plugin - 4.61 + 4.66 jdk-tool diff --git a/src/test/java/hudson/tools/JDKInstallerTest.java b/src/test/java/hudson/tools/JDKInstallerTest.java index 934db79..bc5675a 100644 --- a/src/test/java/hudson/tools/JDKInstallerTest.java +++ b/src/test/java/hudson/tools/JDKInstallerTest.java @@ -3,9 +3,9 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; -import com.gargoylesoftware.htmlunit.html.HtmlForm; -import com.gargoylesoftware.htmlunit.html.HtmlFormUtil; -import com.gargoylesoftware.htmlunit.html.HtmlPage; +import org.htmlunit.html.HtmlForm; +import org.htmlunit.html.HtmlFormUtil; +import org.htmlunit.html.HtmlPage; import hudson.tools.JDKInstaller.DescriptorImpl; import java.io.InputStream; @@ -66,8 +66,8 @@ public void setUp() throws Exception { public void enterCredential() throws Exception { HtmlPage p = j.createWebClient().goTo("descriptorByName/hudson.tools.JDKInstaller/enterCredential"); HtmlForm form = p.getFormByName("postCredential"); - form.getInputByName("username").setValueAttribute("foo"); - form.getInputByName("password").setValueAttribute("bar"); + form.getInputByName("username").setValue("foo"); + form.getInputByName("password").setValue("bar"); HtmlFormUtil.submit(form, null); DescriptorImpl d = j.jenkins.getDescriptorByType(DescriptorImpl.class);