Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions NodeBase/generate_config
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function short_version() {

# A global array of environment variable prefixes supports different browser suffixes
ENV_PREFIXES=(
"SE_NODE_ENABLE_BROWSER"
"SE_NODE_STEREOTYPE"
"SE_NODE_BROWSER_NAME"
"SE_NODE_BROWSER_VERSION"
Expand Down Expand Up @@ -142,6 +143,11 @@ if [ -d "/opt/selenium/browsers" ]; then
echo "===Start generating stereotype for browser: ${browser_name}==="
# Assign environment variables with browser suffix to common variables
assign_browser_specific_env_vars "$browser_name"
if [ "${SE_NODE_ENABLE_BROWSER}" = "false" ]; then
echo "===Skip generating stereotype for browser: ${browser_name}, SE_NODE_ENABLE_BROWSER_${browser_name} is set false==="
restore_original_env_vars
continue
fi

if [ -f "${browser_dir}name" ]; then
SE_NODE_BROWSER_NAME=$(cat "${browser_dir}name")
Expand Down
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,24 @@ According to multi-arch support, browsers are available in images `selenium/node

Both Chrome and Chromium browser binary are available in image arch `linux/amd64`. However, Chrome browser binary is activated by default. In case you want to switch to Chromium browser binary, you can set environment variable `SE_BROWSER_BINARY_LOCATION_CHROME=/usr/bin/chromium`.

Via environment variable `SE_NODE_ENABLE_BROWSER_<BROWSER>`, with `<BROWSER>` is the name of browser in uppercase (e.g. `CHROME`, `FIREFOX`, `EDGE`). You can disable a browser to be installed in the Node/Standalone image all browsers.

For example with image linux/amd64 and linux/arm64, you can disable Firefox browser by setting environment variable `SE_NODE_ENABLE_BROWSER_FIREFOX=false`.

For example with image linux/amd64, you can disable Chrome browser by setting environment variable `SE_NODE_ENABLE_BROWSER_CHROME=false`. Similar for Edge browser, set `SE_NODE_ENABLE_BROWSER_EDGE=false`.

Here is list of environment variables which support suffix `_<BROWSER>` in Node/Standalone image all browsers:

```
SE_NODE_STEREOTYPE
SE_NODE_BROWSER_NAME
SE_NODE_BROWSER_VERSION
SE_NODE_PLATFORM_NAME
SE_BROWSER_BINARY_LOCATION
SE_NODE_STEREOTYPE_EXTRA
SE_NODE_MAX_SESSIONS
```

## Environment Variables

**Checkout full list of environment variables [here](ENV_VARIABLES.md).**
Expand Down
Loading