Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting driver and browser path via configuration #2017

Merged
merged 10 commits into from
Nov 22, 2023
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
8 changes: 6 additions & 2 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ jobs:
- name: Build Docker images
run: VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make build
- name: Test Docker images
run: USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test
uses: nick-invision/retry@v2.8.3
with:
timeout_minutes: 20
max_attempts: 3
command: |
USE_RANDOM_USER_ID=${USE_RANDOM_USER} VERSION=${BRANCH} BUILD_DATE=${BUILD_DATE} make test
env:
USE_RANDOM_USER: ${{ matrix.use-random-user }}

7 changes: 4 additions & 3 deletions Distributor/start-selenium-grid-distributor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,21 @@ if [ ! -z "$SE_DISTRIBUTOR_PORT" ]; then
PORT_CONFIG="--port ${SE_DISTRIBUTOR_PORT}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} distributor \
${EXTRA_LIBS} distributor \
--sessions-host "${SE_SESSIONS_MAP_HOST}" --sessions-port "${SE_SESSIONS_MAP_PORT}" \
--sessionqueue-host "${SE_SESSION_QUEUE_HOST}" --sessionqueue-port "${SE_SESSION_QUEUE_PORT}" \
--publish-events tcp://"${SE_EVENT_BUS_HOST}":"${SE_EVENT_BUS_PUBLISH_PORT}" \
Expand Down
7 changes: 4 additions & 3 deletions EventBus/start-selenium-grid-eventbus.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ if [ ! -z "$SE_OPTS" ]; then
echo "Appending Selenium options: ${SE_OPTS}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} event-bus \
${EXTRA_LIBS} event-bus \
--bind-host ${SE_BIND_HOST} \
${HOST_CONFIG} \
${PORT_CONFIG} \
Expand Down
7 changes: 4 additions & 3 deletions Hub/start-selenium-grid-hub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ if [ ! -z "$SE_SUB_PATH" ]; then
SUB_PATH_CONFIG="--sub-path ${SE_SUB_PATH}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
Expand All @@ -34,9 +35,9 @@ else
fi


java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} hub \
${EXTRA_LIBS} hub \
--session-request-timeout ${SE_SESSION_REQUEST_TIMEOUT} \
--session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \
--relax-checks ${SE_RELAX_CHECKS} \
Expand Down
11 changes: 3 additions & 8 deletions NodeBase/generate_config
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,11 @@ echo "max-sessions = ${SE_NODE_MAX_SESSIONS}
" >> "$FILENAME"

SE_NODE_BROWSER_NAME=$(cat /opt/selenium/browser_name)
if [[ "${SE_NODE_BROWSER_NAME}" == "chrome" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(google-chrome --version | awk '{print $3}'))
elif [[ "${SE_NODE_BROWSER_NAME}" == "firefox" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(firefox --version | awk '{print $3}'))
elif [[ "${SE_NODE_BROWSER_NAME}" == "MicrosoftEdge" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(microsoft-edge --version | awk '{print $3}'))
fi
SE_NODE_BROWSER_VERSION=$(short_version $(cat /opt/selenium/browser_version))
SE__BROWSER_BINARY_LOCATION=$(cat /opt/selenium/browser_binary_location)

if [[ -z "$SE_NODE_STEREOTYPE" ]]; then
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\"}"
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\", ${SE__BROWSER_BINARY_LOCATION}}"
else
SE_NODE_STEREOTYPE="$SE_NODE_STEREOTYPE"
fi
Expand Down
14 changes: 11 additions & 3 deletions NodeBase/start-selenium-node.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,11 @@ if [ "$GENERATE_CONFIG" = true ]; then
/opt/bin/generate_config
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
Expand All @@ -51,9 +52,16 @@ echo "Selenium Grid Node configuration: "
cat "$CONFIG_FILE"
echo "Starting Selenium Grid Node..."

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
CHROME_DRIVER_PATH_PROPERTY=-Dwebdriver.chrome.driver=/usr/bin/chromedriver
EDGE_DRIVER_PATH_PROPERTY=-Dwebdriver.edge.driver=/usr/bin/msedgedriver
GECKO_DRIVER_PATH_PROPERTY=-Dwebdriver.gecko.driver=/usr/bin/geckodriver

java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
${CHROME_DRIVER_PATH_PROPERTY} \
${EDGE_DRIVER_PATH_PROPERTY} \
${GECKO_DRIVER_PATH_PROPERTY} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} node \
${EXTRA_LIBS} node \
--bind-host ${SE_BIND_HOST} \
--config "$CONFIG_FILE" \
${SE_OPTS}
10 changes: 6 additions & 4 deletions NodeChrome/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ RUN if [ ! -z "$CHROME_DRIVER_VERSION" ]; \
&& echo "Using ChromeDriver version: "$CHROME_DRIVER_VERSION \
&& wget --no-verbose -O /tmp/chromedriver_linux64.zip $CHROME_DRIVER_URL \
&& rm -rf /opt/selenium/chromedriver \
&& sudo unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
&& unzip /tmp/chromedriver_linux64.zip -d /opt/selenium \
&& rm /tmp/chromedriver_linux64.zip \
&& sudo mv /opt/selenium/chromedriver-linux64/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
&& sudo chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
&& mv /opt/selenium/chromedriver-linux64/chromedriver /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
&& chmod 755 /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION \
&& sudo ln -fs /opt/selenium/chromedriver-$CHROME_DRIVER_VERSION /usr/bin/chromedriver

#============================================
# Dumping Browser name and version for config
# Dumping Browser information for config
#============================================
RUN echo "chrome" > /opt/selenium/browser_name
RUN google-chrome --version | awk '{print $3}' > /opt/selenium/browser_version
RUN echo "\"goog:chromeOptions\": {\"binary\": \"/usr/bin/google-chrome\"}" > /opt/selenium/browser_binary_location
7 changes: 4 additions & 3 deletions NodeDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,21 @@ if [ ! -z "$SE_NODE_GRID_URL" ]; then
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} node \
${EXTRA_LIBS} node \
--publish-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_PUBLISH_PORT} \
--subscribe-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_SUBSCRIBE_PORT} \
--bind-host ${SE_BIND_HOST} \
Expand Down
4 changes: 3 additions & 1 deletion NodeEdge/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ RUN if [ -z "$EDGE_DRIVER_VERSION" ]; \
&& sudo ln -fs /opt/selenium/msedgedriver-$EDGE_DRIVER_VERSION /usr/bin/msedgedriver

#============================================
# Dumping Browser name and version for config
# Dumping Browser information for config
#============================================
RUN echo "MicrosoftEdge" > /opt/selenium/browser_name
RUN microsoft-edge --version | awk '{print $3}' > /opt/selenium/browser_version
RUN echo "\"ms:edgeOptions\": {\"binary\": \"/usr/bin/microsoft-edge\"}" > /opt/selenium/browser_binary_location
7 changes: 4 additions & 3 deletions NodeFirefox/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ USER root
ARG FIREFOX_VERSION=latest
RUN FIREFOX_DOWNLOAD_URL=$(if [ $FIREFOX_VERSION = "latest" ] || [ $FIREFOX_VERSION = "beta-latest" ] || [ $FIREFOX_VERSION = "nightly-latest" ] || [ $FIREFOX_VERSION = "devedition-latest" ] || [ $FIREFOX_VERSION = "esr-latest" ]; then echo "https://download.mozilla.org/?product=firefox-$FIREFOX_VERSION-ssl&os=linux64&lang=en-US"; else echo "https://download-installer.cdn.mozilla.net/pub/firefox/releases/$FIREFOX_VERSION/linux-x86_64/en-US/firefox-$FIREFOX_VERSION.tar.bz2"; fi) \
&& apt-get update -qqy \
&& apt-get -qqy --no-install-recommends install firefox libavcodec-extra \
&& apt-get -qqy --no-install-recommends install libavcodec-extra \
libgtk-3-dev libdbus-glib-1-dev \
&& rm -rf /var/lib/apt/lists/* /var/cache/apt/* \
&& wget --no-verbose -O /tmp/firefox.tar.bz2 $FIREFOX_DOWNLOAD_URL \
&& apt-get -y purge firefox \
&& rm -rf /opt/firefox \
&& tar -C /opt -xjf /tmp/firefox.tar.bz2 \
&& rm /tmp/firefox.tar.bz2 \
Expand All @@ -40,6 +39,8 @@ RUN GK_VERSION=$(if [ ${GECKODRIVER_VERSION:-latest} = "latest" ]; then echo "0.
USER 1200

#============================================
# Dumping Browser name and version for config
# Dumping Browser information for config
#============================================
RUN echo "firefox" > /opt/selenium/browser_name
RUN firefox --version | awk '{print $3}' > /opt/selenium/browser_version
RUN echo "\"moz:firefoxOptions\": {\"binary\": \"/usr/bin/firefox\"}" > /opt/selenium/browser_binary_location
7 changes: 4 additions & 3 deletions Router/start-selenium-grid-router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,21 @@ if [ ! -z "$SE_ROUTER_PORT" ]; then
PORT_CONFIG="--port ${SE_ROUTER_PORT}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} router \
${EXTRA_LIBS} router \
--sessions-host "${SE_SESSIONS_MAP_HOST}" --sessions-port "${SE_SESSIONS_MAP_PORT}" \
--distributor-host "${SE_DISTRIBUTOR_HOST}" --distributor-port "${SE_DISTRIBUTOR_PORT}" \
--sessionqueue-host "${SE_SESSION_QUEUE_HOST}" --sessionqueue-port "${SE_SESSION_QUEUE_PORT}" \
Expand Down
7 changes: 4 additions & 3 deletions SessionQueue/start-selenium-grid-session-queue.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,21 @@ if [ ! -z "$SE_SESSION_QUEUE_PORT" ]; then
PORT_CONFIG="--port ${SE_SESSION_QUEUE_PORT}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} sessionqueue \
${EXTRA_LIBS} sessionqueue \
--session-request-timeout ${SE_SESSION_REQUEST_TIMEOUT} \
--session-retry-interval ${SE_SESSION_RETRY_INTERVAL} \
--bind-host ${SE_BIND_HOST} \
Expand Down
7 changes: 4 additions & 3 deletions Sessions/start-selenium-grid-sessions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ if [ ! -z "$SE_SESSIONS_PORT" ]; then
PORT_CONFIG="--port ${SE_SESSIONS_PORT}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} sessions \
${EXTRA_LIBS} sessions \
--publish-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_PUBLISH_PORT} \
--subscribe-events tcp://"${SE_EVENT_BUS_HOST}":${SE_EVENT_BUS_SUBSCRIBE_PORT} \
--bind-host ${SE_BIND_HOST} \
Expand Down
11 changes: 3 additions & 8 deletions Standalone/generate_config
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,11 @@ echo "max-sessions = ${SE_NODE_MAX_SESSIONS}
" >> "$FILENAME"

SE_NODE_BROWSER_NAME=$(cat /opt/selenium/browser_name)
if [[ "${SE_NODE_BROWSER_NAME}" == "chrome" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(google-chrome --version | awk '{print $3}'))
elif [[ "${SE_NODE_BROWSER_NAME}" == "firefox" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(firefox --version | awk '{print $3}'))
elif [[ "${SE_NODE_BROWSER_NAME}" == "MicrosoftEdge" ]]; then
SE_NODE_BROWSER_VERSION=$(short_version $(microsoft-edge --version | awk '{print $3}'))
fi
SE_NODE_BROWSER_VERSION=$(short_version $(cat /opt/selenium/browser_version))
SE__BROWSER_BINARY_LOCATION=$(cat /opt/selenium/browser_binary_location)

if [[ -z "$SE_NODE_STEREOTYPE" ]]; then
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\"}"
SE_NODE_STEREOTYPE="{\"browserName\": \"${SE_NODE_BROWSER_NAME}\", \"browserVersion\": \"${SE_NODE_BROWSER_VERSION}\", \"platformName\": \"Linux\", ${SE__BROWSER_BINARY_LOCATION}}"
else
SE_NODE_STEREOTYPE="$SE_NODE_STEREOTYPE"
fi
Expand Down
14 changes: 11 additions & 3 deletions Standalone/start-selenium-standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,28 @@ echo "Selenium Grid Standalone configuration: "
cat /opt/selenium/config.toml
echo "Starting Selenium Grid Standalone..."

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
CHROME_DRIVER_PATH_PROPERTY=-Dwebdriver.chrome.driver=/usr/bin/chromedriver
EDGE_DRIVER_PATH_PROPERTY=-Dwebdriver.edge.driver=/usr/bin/msedgedriver
GECKO_DRIVER_PATH_PROPERTY=-Dwebdriver.gecko.driver=/usr/bin/geckodriver

java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
${CHROME_DRIVER_PATH_PROPERTY} \
${EDGE_DRIVER_PATH_PROPERTY} \
${GECKO_DRIVER_PATH_PROPERTY} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} standalone \
${EXTRA_LIBS} standalone \
--bind-host ${SE_BIND_HOST} \
--config /opt/selenium/config.toml \
${SUB_PATH_CONFIG} \
Expand Down
7 changes: 4 additions & 3 deletions StandaloneDocker/start-selenium-grid-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,21 @@ if [ ! -z "$SE_NODE_GRID_URL" ]; then
SE_GRID_URL="--grid-url ${SE_NODE_GRID_URL}"
fi

EXTRA_LIBS="/opt/selenium/selenium-http-jdk-client.jar"
EXTRA_LIBS=""

if [ ! -z "$SE_ENABLE_TRACING" ]; then
EXTERNAL_JARS=$(</external_jars/.classpath.txt)
EXTRA_LIBS="--ext "
EXTRA_LIBS=${EXTRA_LIBS}:${EXTERNAL_JARS}
echo "Tracing is enabled"
echo "Classpath will be enriched with these external jars : " ${EXTRA_LIBS}
else
echo "Tracing is disabled"
fi

java ${JAVA_OPTS:-$SE_JAVA_OPTS} -Dwebdriver.http.factory=jdk-http-client \
java ${JAVA_OPTS:-$SE_JAVA_OPTS} \
-jar /opt/selenium/selenium-server.jar \
--ext ${EXTRA_LIBS} standalone \
${EXTRA_LIBS} standalone \
--relax-checks ${SE_RELAX_CHECKS} \
--detect-drivers false \
--bind-host ${SE_BIND_HOST} \
Expand Down
5 changes: 4 additions & 1 deletion tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,13 @@ def standalone_browser_container_matches(container):

use_random_user_id = USE_RANDOM_USER_ID == 'true'
run_in_docker_compose = RUN_IN_DOCKER_COMPOSE == 'true'
random_user_id = random.randint(100000, 2147483647)
random_user_id = random.randint(2000, 65000)

if use_random_user_id:
logger.info("Running tests with a random user ID -> %s" % random_user_id)
if 'firefox' in image.lower():
logger.info("Firefox has issues when running with a random user ID. Skipping until it gets fixed.")
exit(0)

standalone = 'standalone' in image.lower()

Expand Down