Skip to content

Commit

Permalink
Issue #3 - Missing drivers
Browse files Browse the repository at this point in the history
* Added necessary command line parameters for Google Chrome
* Created a workaround for a path problem for Google Chrome
  • Loading branch information
ppodgorsek committed Jan 30, 2017
1 parent f4370d6 commit 5800cbb
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
19 changes: 13 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,25 @@ VOLUME /opt/robotframework/tests
COPY dnf/google-chrome.repo /etc/yum.repos.d/google-chrome.repo

RUN dnf upgrade -y\
&& dnf install -y chromedriver-55.0.2883.87-1.fc25\
firefox-50.1.0-3.fc25\
google-chrome-stable-55.0.2883.87-1\
&& dnf install -y\
chromedriver-55.0.2883.87-1.fc25\
firefox-51.0.1-1.fc25\
google-chrome-stable-56.0.2924.76-1\
python-pip-8.1.2-2.fc25\
xorg-x11-server-Xvfb-1.19.1-2.fc25\
&& dnf clean all

RUN pip install robotframework==3.0.1\
robotframework-selenium2library==1.8.0

ADD drivers/geckodriver-v0.13.0-linux64.tar.gz /opt/drivers/
ADD drivers/geckodriver-v0.13.0-linux64.tar.gz /opt/robotframework/drivers/

ENV PATH=/opt/drivers:$PATH
COPY bin/google-chrome.sh /opt/robotframework/bin/google-chrome

ENTRYPOINT ["xvfb-run", "--server-args='-screen 0 1920x1080x24'", "robot", "--outputDir", "/opt/robotframework/reports", "/opt/robotframework/tests"]
# FIXME: below is a workaround, as the path is ignored
RUN mv /opt/google/chrome/google-chrome /opt/google/chrome/google-chrome-original\
&& ln -sfv /opt/robotframework/bin/google-chrome /opt/google/chrome/google-chrome

ENV PATH=/opt/robotframework/bin:/opt/robotframework/drivers:$PATH

ENTRYPOINT ["xvfb-run", "--server-args=-screen 0 1920x1080x24 -ac", "robot", "--outputDir", "/opt/robotframework/reports", "/opt/robotframework/tests"]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ The versioning of this image follows the one of Robot Framework:

The versions used in the latest version are:

* Robot Framework 3.0
* Robot Framework 3.0.1
* Robot Framework selenium2library 1.8.0
* Firefox 50.1
* Google Chrome 55.0
* Firefox 51.0
* Google Chrome 56.0

## Running the container

Expand Down
4 changes: 0 additions & 4 deletions bin/firefox.sh

This file was deleted.

3 changes: 1 addition & 2 deletions bin/google-chrome.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/sh

# Xvfb is used to run Chrome in a virtual X server, as there is no graphical interface.
xvfb-run /usr/bin/google-chrome
/opt/google/chrome/google-chrome-original --disable-gpu --no-sandbox $@

0 comments on commit 5800cbb

Please sign in to comment.