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

Issue #352 - Add support for Microsoft Edge #408

Merged
merged 2 commits into from
Sep 6, 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
3 changes: 2 additions & 1 deletion .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
include:
- browser: "chrome"
- browser: "firefox"
- browser: "edge"
env:
BROWSER: ${{ matrix.browser }}
steps:
Expand Down Expand Up @@ -74,4 +75,4 @@ jobs:
docker run --user=2000:2000 --shm-size=1g -v `pwd`/test:/opt/robotframework/tests:Z -e BROWSER=$BROWSER $IMAGE_NAME
- name: Datetime
run:
docker run --user=2000:2000 --shm-size=1g -v `pwd`/test:/opt/robotframework/tests:Z -e BROWSER=$BROWSER -e TZ="America/New_York" $IMAGE_NAME
docker run --user=2000:2000 --shm-size=1g -v `pwd`/test:/opt/robotframework/tests:Z -e BROWSER=$BROWSER -e TZ="America/New_York" $IMAGE_NAME
23 changes: 22 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,9 @@ ENV CHROMIUM_VERSION 99.0
ENV DATABASE_LIBRARY_VERSION 1.2.4
ENV DATADRIVER_VERSION 1.6.0
ENV DATETIMETZ_VERSION 1.0.6
ENV EDGE_VERSION 101.0.1210.39
ENV FAKER_VERSION 5.0.0
ENV FIREFOX_VERSION 98.0
ENV FIREFOX_VERSION 100.0
ENV FTP_LIBRARY_VERSION 1.9
ENV GECKO_DRIVER_VERSION v0.30.0
ENV IMAP_LIBRARY_VERSION 0.4.2
Expand Down Expand Up @@ -68,6 +69,7 @@ RUN dnf upgrade -y --refresh \
python3-pip \
tzdata \
xorg-x11-server-Xvfb-${XVFB_VERSION}* \
dnf-plugins-core \
&& dnf clean all

# FIXME: below is a workaround, as the path is ignored
Expand Down Expand Up @@ -110,6 +112,25 @@ RUN dnf install -y \
wget \
&& dnf clean all

# Install Microsoft Edge & webdriver
RUN rpm --import https://packages.microsoft.com/keys/microsoft.asc \
&& dnf config-manager --add-repo https://packages.microsoft.com/yumrepos/edge \
&& dnf makecache \
&& dnf install -y \
microsoft-edge-stable-${EDGE_VERSION} \
wget \
zip \

&& wget -q "https://msedgedriver.azureedge.net/${EDGE_VERSION}/edgedriver_linux64.zip" \
&& unzip edgedriver_linux64.zip -d edge \
&& mv edge/msedgedriver /opt/robotframework/drivers/ \
&& rm -Rf edgedriver_linux64.zip edge/ \

# IMPORTANT: don't remove the wget package because it's a dependency of Microsoft Edge
&& dnf remove -y \
jeabakker marked this conversation as resolved.
Show resolved Hide resolved
zip \
&& dnf clean all

# Install the Node dependencies for the Browser library
# FIXME: Playright currently doesn't support relying on system browsers, which is why the `--skip-browsers` parameter cannot be used here.
RUN rfbrowser init \
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Robot Framework in Docker, with Firefox and Chrome
# Robot Framework in Docker, with Firefox, Chrome and Edge

## What is it?

This project consists of a Docker image containing a Robot Framework installation.

This installation also contains Firefox, Chrome and the Selenium library for Robot Framework. The test cases and reports should be mounted as volumes.
This installation also contains Firefox, Chrome, Edge and the Selenium library for Robot Framework. The test cases and reports should be mounted as volumes.

## Versioning

Expand All @@ -28,8 +28,9 @@ The versions used are:
* [Robot Framework SeleniumLibrary](https://github.com/robotframework/SeleniumLibrary) 6.0.0
* [Robot Framework SSHLibrary](https://github.com/robotframework/SSHLibrary) 3.8.0
* [Axe Selenium Library](https://github.com/mozilla-services/axe-selenium-python) 2.1.6
* Firefox 91.7
* Firefox 100.0
* Chromium 99.0
* Edge 101.0.1210.39
* [Amazon AWS CLI](https://pypi.org/project/awscli/) 1.22.87

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.
Expand All @@ -47,7 +48,7 @@ This container can be run using the following command:

Browsers can be easily switched. It is recommended to define `${BROWSER} %{BROWSER}` in your Robot variables and to use `${BROWSER}` in your test cases. This allows to set the browser in a single place if needed.

When running your tests, simply add `-e BROWSER=chrome` or `-e BROWSER=firefox` to the run command.
When running your tests, simply add `-e BROWSER=chrome`, `-e BROWSER=firefox` or `-e BROWSER=edge`to the run command.

### Changing the container's screen resolution

Expand Down