Package org.openqa.selenium.htmlunit
Class BrowserVersionDeterminer
java.lang.Object
org.openqa.selenium.htmlunit.BrowserVersionDeterminer
Determines the appropriate
BrowserVersion to use based on system properties,
capabilities, or other configuration sources. Provides utilities to select or customize
browser versions for HtmlUnitDriver instances.- Author:
- Martin Bartoš, Ronald Brill
-
Method Summary
Modifier and TypeMethodDescriptionstatic BrowserVersiondetermine(org.openqa.selenium.Capabilities capabilities) Determine browser by its capabilities.static StringgetBrowserVersion(org.openqa.selenium.Capabilities capabilities) Retrieves the browser version string from the givenCapabilities.
-
Method Details
-
determine
Determine browser by its capabilities.- Parameters:
capabilities- the Capabilities- Returns:
- the browser version
-
getBrowserVersion
Retrieves the browser version string from the givenCapabilities. Checks bothHtmlUnitDriverOptions.BROWSER_VERSIONandCapabilityType.BROWSER_VERSION.- Parameters:
capabilities- the capabilities to inspect- Returns:
- the browser version as a string, or an empty string if not specified
-