From 821eff3dbdc7da9cc77b57f52efd90ef1a648b1a Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Sat, 10 Aug 2024 18:41:55 +0700 Subject: [PATCH] update: Enable reject-unsupported-caps in standalone by default (#2346) Signed-off-by: Viet Nguyen Duc --- Standalone/Dockerfile | 1 + Standalone/start-selenium-standalone.sh | 2 ++ .../start-selenium-grid-docker.sh | 25 +++++++++++++++++++ 3 files changed, 28 insertions(+) diff --git a/Standalone/Dockerfile b/Standalone/Dockerfile index 9aef874ae..839931087 100644 --- a/Standalone/Dockerfile +++ b/Standalone/Dockerfile @@ -28,6 +28,7 @@ ENV SE_SESSION_REQUEST_TIMEOUT=300 \ SE_HEALTHCHECK_INTERVAL=120 \ # Boolean value, maps "--relax-checks" SE_RELAX_CHECKS=true \ + SE_REJECT_UNSUPPORTED_CAPS=true \ SE_OTEL_SERVICE_NAME="selenium-standalone" EXPOSE 4444 diff --git a/Standalone/start-selenium-standalone.sh b/Standalone/start-selenium-standalone.sh index 270e47a80..b28b488ed 100755 --- a/Standalone/start-selenium-standalone.sh +++ b/Standalone/start-selenium-standalone.sh @@ -161,6 +161,8 @@ java ${JAVA_OPTS:-$SE_JAVA_OPTS} \ --session-request-timeout ${SE_SESSION_REQUEST_TIMEOUT} \ --session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \ --healthcheck-interval ${SE_HEALTHCHECK_INTERVAL} \ + --relax-checks ${SE_RELAX_CHECKS} \ + --detect-drivers false \ --bind-host ${SE_BIND_HOST} \ --config /opt/selenium/config.toml \ ${SUB_PATH_CONFIG} \ diff --git a/StandaloneDocker/start-selenium-grid-docker.sh b/StandaloneDocker/start-selenium-grid-docker.sh index d80530b7f..1dcd47055 100755 --- a/StandaloneDocker/start-selenium-grid-docker.sh +++ b/StandaloneDocker/start-selenium-grid-docker.sh @@ -14,6 +14,31 @@ if [ ! -z "$SE_NODE_GRID_URL" ]; then SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}" fi +if [ ! -z "$SE_NODE_ENABLE_MANAGED_DOWNLOADS" ]; then + echo "Appending Selenium options: --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" + SE_OPTS="$SE_OPTS --enable-managed-downloads ${SE_NODE_ENABLE_MANAGED_DOWNLOADS}" +fi + +if [ ! -z "$SE_NODE_ENABLE_CDP" ]; then + echo "Appending Selenium options: --enable-cdp ${SE_NODE_ENABLE_CDP}" + SE_OPTS="$SE_OPTS --enable-cdp ${SE_NODE_ENABLE_CDP}" +fi + +if [ ! -z "$SE_NODE_REGISTER_PERIOD" ]; then + echo "Appending Selenium options: --register-period ${SE_NODE_REGISTER_PERIOD}" + SE_OPTS="$SE_OPTS --register-period ${SE_NODE_REGISTER_PERIOD}" +fi + +if [ ! -z "$SE_NODE_REGISTER_CYCLE" ]; then + echo "Appending Selenium options: --register-cycle ${SE_NODE_REGISTER_CYCLE}" + SE_OPTS="$SE_OPTS --register-cycle ${SE_NODE_REGISTER_CYCLE}" +fi + +if [ ! -z "$SE_NODE_HEARTBEAT_PERIOD" ]; then + echo "Appending Selenium options: --heartbeat-period ${SE_NODE_HEARTBEAT_PERIOD}" + SE_OPTS="$SE_OPTS --heartbeat-period ${SE_NODE_HEARTBEAT_PERIOD}" +fi + if [ ! -z "$SE_LOG_LEVEL" ]; then echo "Appending Selenium options: --log-level ${SE_LOG_LEVEL}" SE_OPTS="$SE_OPTS --log-level ${SE_LOG_LEVEL}"