Skip to content

Commit 1ae1692

Browse files
committed
Added Chrome for Testing instead of Chromium
1 parent 935b15d commit 1ae1692

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

Dockerfile

Lines changed: 26 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ ENV ROBOT_GID 1000
3535
ENV AWS_CLI_VERSION 1.32.36
3636
ENV AXE_SELENIUM_LIBRARY_VERSION 2.1.6
3737
ENV BROWSER_LIBRARY_VERSION 18.0.0
38-
ENV CHROMIUM_VERSION 122.0
38+
ENV CHROME_VERSION 123.0.6312.122
3939
ENV DATABASE_LIBRARY_VERSION 1.4.3
4040
ENV DATADRIVER_VERSION 1.10.0
4141
ENV DATETIMETZ_VERSION 1.0.6
4242
ENV MICROSOFT_EDGE_VERSION 121.0.2277.106
4343
ENV FAKER_VERSION 5.0.0
44-
ENV FIREFOX_VERSION 123.0
44+
ENV FIREFOX_VERSION 124.0
4545
ENV FTP_LIBRARY_VERSION 1.9
4646
ENV GECKO_DRIVER_VERSION v0.33.0
4747
ENV IMAP_LIBRARY_VERSION 0.4.6
@@ -56,15 +56,13 @@ ENV XVFB_VERSION 1.20
5656
ENV AWS_UPLOAD_TO_S3 false
5757

5858
# Prepare binaries to be executed
59-
COPY bin/chromedriver.sh /opt/robotframework/bin/chromedriver
60-
COPY bin/chromium-browser.sh /opt/robotframework/bin/chromium-browser
59+
COPY bin/chromedriver.sh /opt/robotframework/drivers/chromedriver
60+
COPY bin/chrome.sh /opt/robotframework/bin/chrome
6161
COPY bin/run-tests-in-virtual-screen.sh /opt/robotframework/bin/
6262

6363
# Install system dependencies
6464
RUN dnf upgrade -y --refresh \
6565
&& dnf install -y \
66-
chromedriver-${CHROMIUM_VERSION}* \
67-
chromium-${CHROMIUM_VERSION}* \
6866
dbus-glib \
6967
firefox-${FIREFOX_VERSION}* \
7068
gcc \
@@ -78,9 +76,28 @@ RUN dnf upgrade -y --refresh \
7876
dnf-plugins-core \
7977
&& dnf clean all
8078

81-
# FIXME: below is a workaround, as the path is ignored
82-
RUN mv /usr/lib64/chromium-browser/chromium-browser /usr/lib64/chromium-browser/chromium-browser-original \
83-
&& ln -sfv /opt/robotframework/bin/chromium-browser /usr/lib64/chromium-browser/chromium-browser
79+
# Install Chrome for Testing with dependencies
80+
RUN dnf install -y \
81+
zip \
82+
83+
# Exclude bash dependency to avoid conflicts
84+
&& dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
85+
grep provider | grep -v "bash" | \
86+
sort --unique | \
87+
awk '{print $2}' | \
88+
xargs dnf install --best --allowerasing --skip-broken -y \
89+
&& wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip" \
90+
&& wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" \
91+
&& unzip chrome-linux64.zip \
92+
&& unzip chromedriver-linux64.zip \
93+
&& mkdir -p /opt/chrome-for-testing/ \
94+
&& mv chrome-linux64 /opt/chrome-for-testing \
95+
&& mv chromedriver-linux64 /opt/chrome-for-testing \
96+
&& rm chrome-linux64.zip chromedriver-linux64.zip \
97+
98+
&& dnf remove -y \
99+
zip \
100+
&& dnf clean all
84101

85102
# Install Robot Framework and associated libraries
86103
RUN pip3 install \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ The versions used are:
6161
* [Robot Framework SeleniumLibrary](https://github.com/robotframework/SeleniumLibrary) 6.2.0
6262
* [Robot Framework SSHLibrary](https://github.com/robotframework/SSHLibrary) 3.8.0
6363
* [Axe Selenium Library](https://github.com/mozilla-services/axe-selenium-python) 2.1.6
64-
* Firefox 123.0
65-
* Chromium 122.0
64+
* Firefox 124.0
65+
* Chrome for Testing 123.0
6666
* Microsoft Edge 121.0.2277.106
6767
* [Amazon AWS CLI](https://pypi.org/project/awscli/) 1.32.36
6868

bin/chrome.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/sh
2+
3+
exec /opt/chrome-for-testing/chrome-linux64/chrome --disable-gpu --no-sandbox "$@"

bin/chromedriver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/sh
22

3-
exec /usr/bin/chromedriver --verbose --log-path=/var/log/chromedriver --no-sandbox "$@"
3+
exec /opt/chrome-for-testing/chromedriver-linux64/chromedriver --verbose --log-path=/var/log/chromedriver --no-sandbox "$@"

bin/chromium-browser.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)