Registry / testing / htmlunit

htmlunit

JSON →
library2.70.0javamavenunverified

A headless browser intended for use in testing web-based applications, simulating browser behavior without a GUI.

<dependency> <groupId>net.sourceforge.htmlunit</groupId> <artifactId>htmlunit</artifactId> <version>2.70.0</version> </dependency>
INSTALL
IMPORT
SIG · HTMLUNIT
H
htmlunit
testingjavav2.70.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WebClient
com.gargoylesoftware.htmlunit.WebClient

Fetches a web page and prints its title using HtmlUnit's headless browser.

import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; public class Quickstart { public static void main(String[] args) throws Exception { try (WebClient webClient = new WebClient()) { webClient.getOptions().setJavaScriptEnabled(false); HtmlPage page = webClient.getPage("http://example.com"); System.out.println(page.getTitleText()); } } }
Debug
Known issues
breakingHtmlUnit 2.70.0 requires Java 11 or later.
fix
Ensure your project uses Java 11+.
affects: >=2.70.0
Upgrade
Version history
2.70.0latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
htmlunit — mvn dependency:get htmlunit · libregistry