Class BrowserVersionDeterminer


  • public final class BrowserVersionDeterminer
    extends Object
    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 Detail

      • determine

        public static BrowserVersion determine​(org.openqa.selenium.Capabilities capabilities)
        Determine browser by its capabilities.
        Parameters:
        capabilities - the Capabilities
        Returns:
        the browser version
      • getBrowserVersion

        public static String getBrowserVersion​(org.openqa.selenium.Capabilities capabilities)
        Retrieves the browser version string from the given Capabilities. Checks both HtmlUnitDriverOptions.BROWSER_VERSION and CapabilityType.BROWSER_VERSION.
        Parameters:
        capabilities - the capabilities to inspect
        Returns:
        the browser version as a string, or an empty string if not specified