Skip to content

Commit 3b8d2f1

Browse files
committed
Add Chrome for Testing instead of Chromium
* Merged the latest master branch into this one * Simplified the Chrome for Testing setup
1 parent 3302dbd commit 3b8d2f1

File tree

4 files changed

+10
-30
lines changed

4 files changed

+10
-30
lines changed

Dockerfile

Lines changed: 6 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM fedora:40
22

3-
MAINTAINER Paul Podgorsek <[email protected]>
3+
LABEL authors Paul Podgorsek
44
LABEL description Robot Framework in Docker.
55

66
# Set the Python dependencies' directory environment variable
@@ -35,7 +35,7 @@ ENV ROBOT_GID 1000
3535
ENV AWS_CLI_VERSION 1.33.23
3636
ENV AXE_SELENIUM_LIBRARY_VERSION 2.1.6
3737
ENV BROWSER_LIBRARY_VERSION 18.6.3
38-
ENV CHROME_VERSION 123.0.6312.122
38+
ENV CHROME_VERSION 126.0.6478.126
3939
ENV DATABASE_LIBRARY_VERSION 1.4.4
4040
ENV DATADRIVER_VERSION 1.11.2
4141
ENV DATETIMETZ_VERSION 1.0.6
@@ -77,28 +77,10 @@ RUN dnf upgrade -y --refresh \
7777
xorg-x11-server-Xvfb-${XVFB_VERSION}* \
7878
&& dnf clean all
7979

80-
# Install Chrome for Testing with dependencies
81-
RUN dnf install -y \
82-
zip \
83-
84-
# Exclude bash dependency to avoid conflicts
85-
&& dnf deplist https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm | \
86-
grep provider | grep -v "bash" | \
87-
sort --unique | \
88-
awk '{print $2}' | \
89-
xargs dnf install --best --allowerasing --skip-broken -y \
90-
&& wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chrome-linux64.zip" \
91-
&& wget -q "https://storage.googleapis.com/chrome-for-testing-public/${CHROME_VERSION}/linux64/chromedriver-linux64.zip" \
92-
&& unzip chrome-linux64.zip \
93-
&& unzip chromedriver-linux64.zip \
94-
&& mkdir -p /opt/chrome-for-testing/ \
95-
&& mv chrome-linux64 /opt/chrome-for-testing \
96-
&& mv chromedriver-linux64 /opt/chrome-for-testing \
97-
&& rm chrome-linux64.zip chromedriver-linux64.zip \
98-
99-
&& dnf remove -y \
100-
zip \
101-
&& dnf clean all
80+
# Install Chrome for Testing
81+
# https://developer.chrome.com/blog/chrome-for-testing/
82+
RUN npx @puppeteer/browsers install chrome@${CHROME_VERSION} \
83+
&& npx @puppeteer/browsers install chromedriver@${CHROME_VERSION}
10284

10385
# Install Robot Framework and associated libraries
10486
RUN pip3 install \
@@ -137,12 +119,10 @@ RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
137119
&& dnf install -y \
138120
microsoft-edge-stable-${MICROSOFT_EDGE_VERSION} \
139121
zip \
140-
141122
&& wget -q "https://msedgedriver.azureedge.net/${MICROSOFT_EDGE_VERSION}/edgedriver_linux64.zip" \
142123
&& unzip edgedriver_linux64.zip -d edge \
143124
&& mv edge/msedgedriver /opt/robotframework/drivers/msedgedriver \
144125
&& rm -Rf edgedriver_linux64.zip edge/ \
145-
146126
# IMPORTANT: don't remove the wget package because it's a dependency of Microsoft Edge
147127
&& dnf remove -y \
148128
zip \

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ The versions used are:
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
6464
* Firefox 128.0
65-
* Chrome for Testing 123.0
66-
* Microsoft Edge 126.0.2592.87
65+
* [Chrome for Testing](https://googlechromelabs.github.io/chrome-for-testing/) 126.0
66+
* Microsoft Edge 126.0
6767
* [Amazon AWS CLI](https://pypi.org/project/awscli/) 1.33.23
6868

6969
As stated by [the official GitHub project](https://github.com/robotframework/Selenium2Library), starting from version 3.0, Selenium2Library is renamed to SeleniumLibrary and this project exists mainly to help with transitioning. The Selenium2Library 3.0.0 is also the last release and for new releases, please look at the [SeleniumLibrary](https://github.com/robotframework/SeleniumLibrary) project.

bin/chrome.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 /opt/chrome-for-testing/chrome-linux64/chrome --disable-gpu --no-sandbox "$@"
3+
exec /chrome/linux-${CHROME_VERSION}/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 /opt/chrome-for-testing/chromedriver-linux64/chromedriver --verbose --log-path=/var/log/chromedriver --no-sandbox "$@"
3+
exec /chromedriver/linux-${CHROME_VERSION}/chromedriver-linux64/chromedriver --verbose --log-path=/var/log/chromedriver --no-sandbox "$@"

0 commit comments

Comments
 (0)