Checks if Chrome is available and optionally downloads a standalone Chrome for Testing if not found. This ensures Chrome-based rendering works without requiring a system-wide Chrome installation.
Details
When download = TRUE, this function will download "Chrome for Testing",
a standalone Chrome distribution designed for automation. The download
is approximately 150MB and is cached in the user's data directory.
Alternatively, you can:
Install Chrome/Chromium system-wide
Set the
CHROMOTE_CHROMEenvironment variable to point to an existing installation
Examples
# Check and report status
ensure_chrome()
#> ✔ Chrome is available: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
#> [1] TRUE
# Download Chrome if not available
if (FALSE) # Requires an external Chrome/Chromium installation
ensure_chrome(download = TRUE)
# \dontrun{}