-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Add ability to download browsers (not just drivers) with the sbase get command.
Browser Binaries:
🎛️ Use the sbase get command to download the Chrome for Testing and Chrome-Headless-Shell browser binaries. Example:
sbase get cft # (For `Chrome for Testing`)
sbase get chs # (For `Chrome-Headless-Shell`)Those commands download those binaries into the seleniumbase/drivers folder.
To use the binaries from there in SeleniumBase scripts, set the binary_location to cft or chs.
See https://googlechromelabs.github.io/chrome-for-testing/ for info about Chrome for Testing and Chrome-Headless-Shell.
Setting the binary location:
🔵 By default, SeleniumBase uses the browser binary detected on the System PATH.
🎛️ To change this default behavior, you can use:
pytest --binary-location=PATHThe PATH in --binary-location=PATH / --bl=PATH can be:
- A relative or exact path to the browser binary.
"cft"as a special option forChrome for Testing."chs"as a special option forChrome-Headless-Shell.
Before using the "cft" / "chs" options, call sbase get cft / sbase get chs in order to download the specified binaries into the seleniumbase/drivers folder. The default version is the latest stable version on https://googlechromelabs.github.io/chrome-for-testing/. You can change that by specifying the arg as a parameter. (Eg. sbase get cft 131, sbase get chs 132, etc.)
With the SB() and Driver() formats, the binary location is set via the binary_location parameter.