A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/SeleniumHQ/htmlunit-driver below:

SeleniumHQ/htmlunit-driver: WebDriver compatible driver for HtmlUnit headless browser.

Version 4.34.0 / July 31, 2025

HtmlUnitDriver is a WebDriver compatible driver for the HtmlUnit headless browser.

Developer Blog

HtmlUnit@mastodon | HtmlUnit@bsky | HtmlUnit@Twitter

HtmlUnit Remote - Selenium 4 Grid support

Please have a look at the HtmlUnit Remote project if you like to use this driver from Selenium 4 Grid.

An overview of the different versions, the HtmlUnit version used in each case and the compatibility can be found in these tables.

Simply add a dependency on the latest htmlunit3-driver version available in the Maven Central repository.

Add to your pom.xml:

<dependency>
    <groupId>org.seleniumhq.selenium</groupId>
    <artifactId>htmlunit3-driver</artifactId>
    <version>4.34.0</version>
</dependency>

Add to your build.gradle:

implementation group: 'org.seleniumhq.selenium', name: 'htmlunit3-driver', version: '4.34.0'

You can simply use one of the constructors from the HtmlUnit driver class

// simple case - no javascript support
WebDriver webDriver = new HtmlUnitDriver();
// specify the browser - no javascript support
WebDriver webDriver = new HtmlUnitDriver(BrowserVersion.FIREFOX);
// simple case - javascript support enabled
WebDriver webDriver = new HtmlUnitDriver(true);
// specify the browser - javascript support enabled
WebDriver webDriver = new HtmlUnitDriver(BrowserVersion.FIREFOX, true);

HtmlUnit offers many customization options. Similar to the other WebDriver implementations, the HtmlUnitDriverOptions class can be used to customize your HtmlUnit driver.

final HtmlUnitDriverOptions driverOptions = new HtmlUnitDriverOptions(BrowserVersion.FIREFOX);

// configure e.g.
driverOptions.setCapability(HtmlUnitOption.optThrowExceptionOnScriptError, false);

HtmlUnitDriver webDriver = new HtmlUnitDriver(driverOptions);
// use the driver

NOTE: Complete details for the HtmlUnitDriverOptions class can be found here.

An overview of the different versions, the HtmlUnit version used in each case and the compatibility can be found in these tables.

HtmlUnitDriver is distributed under Apache License 2.0.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4