Class ChromeUtils
java.lang.Object
uno.anahata.asi.yam.tools.chrome.ChromeUtils
Utility class for Chrome-specific path detection and environment resolution.
This class leverages SystemUtils from Apache Commons Lang 3 for
reliable OS detection.
- Author:
- anahata
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringAttempts to find a validchromedriverexecutable on the local machine.static StringGets the expected name of the ChromeDriver executable for the current OS.static StringResolves the absolute path to the standard Chrome user data directory for the current operating system.
-
Constructor Details
-
ChromeUtils
public ChromeUtils()
-
-
Method Details
-
getDefaultChromeUserDataDir
Resolves the absolute path to the standard Chrome user data directory for the current operating system.Supports Windows (AppData), macOS (Application Support), and Linux (various
.configlocations).- Returns:
- The absolute path to the directory.
-
getChromeDriverExecutableName
Gets the expected name of the ChromeDriver executable for the current OS.- Returns:
- The executable name (e.g., "chromedriver.exe" or "chromedriver").
-
findChromeDriver
Attempts to find a validchromedriverexecutable on the local machine.Prioritizes
~/bin(user-local installs) and then searches the systemPATH.- Returns:
- The absolute path to the driver, or
nullif not found.
-

