@@ -680,8 +680,7 @@ RUN cd /tmp \
680680# && rm -rf /var/lib/apt/lists/*
681681# ENV FF_VER="latest" \
682682# FF_LANG="en-US" \
683- # FF_DEST="/usr/lib/firefox"
684- # ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
683+ # FIREFOX_DEST_BIN="/usr/lib/firefox/firefox"
685684# RUN ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
686685
687686# -------------------------#
@@ -709,39 +708,49 @@ RUN cd /tmp \
709708
710709ENV FF_LANG="en-US" \
711710 FF_BASE_URL="https://archive.mozilla.org/pub" \
712- FF_DEST="${SEL_HOME}/firefox"
713- ENV FIREFOX_DEST_BIN="${FF_DEST}/firefox"
714-
715- # --- Stable
716- ENV FF_VER="47.0.1" \
717711 FF_PLATFORM="linux-x86_64" \
718712 FF_INNER_PATH="firefox/releases"
713+
714+ # --- For Selenium 3
715+ ENV FF_VER="49.0.1"
719716ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
720717ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
718+ RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
719+ && wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
720+ && bzip2 -d "firefox.tar.bz2" \
721+ && tar xf "firefox.tar" \
722+ && rm "firefox.tar" \
723+ && mv firefox firefox-for-sel-3 \
724+ && sudo ln -fs ${SEL_HOME}/firefox-for-sel-3/firefox /usr/bin/firefox
721725
726+ # --- Stable for Selenium 2
727+ ENV FF_VER="47.0.1"
728+ ENV FF_COMP="firefox-${FF_VER}.tar.bz2"
729+ ENV FF_URL="${FF_BASE_URL}/${FF_INNER_PATH}/${FF_VER}/${FF_PLATFORM}/${FF_LANG}/${FF_COMP}"
722730RUN mkdir -p ${SEL_HOME} && cd ${SEL_HOME} \
723731 && wget -nv "${FF_URL}" -O "firefox.tar.bz2" \
724732 && bzip2 -d "firefox.tar.bz2" \
725733 && tar xf "firefox.tar" \
726734 && rm "firefox.tar" \
727- && sudo ln -fs ${FIREFOX_DEST_BIN} /usr/bin/firefox
735+ && mv firefox firefox-for-sel-2 \
736+ && sudo ln -fs ${SEL_HOME}/firefox-for-sel-2/firefox /usr/bin/firefox
728737
729738# ============
730739# GeckoDriver
731740# ============
732- # ENV GECKOD_VER="0.10.0" \
733- # GECKOD_URL="https://github.com/mozilla/geckodriver/releases/download"
734- # RUN wget --no-verbose -O /tmp/geckodriver.tar.gz \
735- # "${GECKOD_URL}/v${GECKOD_VER}/geckodriver-v${GECKOD_VER}-linux64.tar.gz" \
736- # && rm -rf /opt/geckodriver* \
737- # && tar -C /opt -xvzf /tmp/geckodriver.tar.gz \
738- # && mv /opt/geckodriver /usr/bin/geckodriver \
739- # && chmod +x /usr/bin/geckodriver \
740- # && ln -fs /usr/bin/geckodriver /opt/geckodriver \
741- # && ln -fs /usr/bin/geckodriver /usr/bin/wires \
742- # && ln -fs /usr/bin/ geckodriver ${FF_DEST}/geckodriver \
743- # && ln -fs /usr/bin/geckodriver ${FF_DEST}/wires \
744- # && rm /tmp/ geckodriver.tar.gz
741+ ENV GECKOD_VER="0.10.0" \
742+ GECKOD_URL="https://github.com/mozilla/geckodriver/releases/download"
743+ RUN wget --no-verbose -O /tmp/geckodriver.tar.gz \
744+ "${GECKOD_URL}/v${GECKOD_VER}/geckodriver-v${GECKOD_VER}-linux64.tar.gz" \
745+ && rm -rf /opt/geckodriver* \
746+ && tar -C /opt -xvzf /tmp/geckodriver.tar.gz \
747+ && mv /opt/geckodriver /usr/bin/geckodriver \
748+ && chmod +x /usr/bin/geckodriver \
749+ && ln -fs /usr/bin/geckodriver /opt/geckodriver \
750+ && ln -fs /usr/bin/geckodriver /usr/bin/wires \
751+ && rm /tmp/ geckodriver.tar.gz
752+ # && ln -fs /usr/bin/geckodriver ${FF_DEST}/geckodriver \
753+ # && ln -fs /usr/bin/ geckodriver ${FF_DEST}/wires \
745754
746755 # && rm -rf ${NORMAL_USER_HOME}/firefox-src
747756# RUN mkdir -p ${NORMAL_USER_HOME}/firefox-src \
@@ -774,13 +783,22 @@ USER ${NORMAL_USER}
774783# ==========
775784# Selenium
776785# ==========
777- ENV SEL_MAJOR_MINOR_VER 2.53
778- ENV SEL_PATCH_LEVEL_VER 1
786+ # Selenium 3
787+ ENV SEL_DIRECTORY="3.0-beta4" \
788+ SEL_VERSION="3.0.0-beta4"
789+ RUN mkdir -p ${SEL_HOME} \
790+ && export SELBASE="https://selenium-release.storage.googleapis.com" \
791+ && export SELPATH="${SEL_DIRECTORY}/selenium-server-standalone-${SEL_VERSION}.jar" \
792+ && wget -nv ${SELBASE}/${SELPATH} \
793+ -O ${SEL_HOME}/selenium-server-standalone-3.jar
794+ # Selenium 2
795+ ENV SEL_MAJOR_MINOR_VER="2.53" \
796+ SEL_PATCH_LEVEL_VER="1"
779797RUN mkdir -p ${SEL_HOME} \
780798 && export SELBASE="https://selenium-release.storage.googleapis.com" \
781799 && export SELPATH="${SEL_MAJOR_MINOR_VER}/selenium-server-standalone-${SEL_MAJOR_MINOR_VER}.${SEL_PATCH_LEVEL_VER}.jar" \
782800 && wget -nv ${SELBASE}/${SELPATH} \
783- -O ${SEL_HOME}/selenium-server-standalone.jar
801+ -O ${SEL_HOME}/selenium-server-standalone-2 .jar
784802
785803# ==================
786804# Chrome webdriver
@@ -816,7 +834,7 @@ RUN mkdir -p ${NORMAL_USER_HOME}/tmp && cd ${NORMAL_USER_HOME}/tmp \
816834# TODO: Use Google fingerprint to verify downloads
817835# https://www.google.de/linuxrepositories/
818836# Also fix .deb file names with correct version
819- RUN latest_chrome_version_trigger="53.0.2785.116 " \
837+ RUN latest_chrome_version_trigger="53.0.2785.143 " \
820838 && mkdir -p ${NORMAL_USER_HOME}/chrome-deb \
821839 && export CHROME_URL="https://dl.google.com/linux/direct" \
822840 && wget -nv -O \
@@ -972,6 +990,8 @@ ENV DEFAULT_SELENIUM_HUB_PORT="24444" \
972990 # Firefox version to use during run
973991 # For firefox please pick one of $FIREFOX_VERSIONS, default latest
974992ENV FIREFOX_VERSION="${FF_VER}" \
993+ # Selenium 2 or 3
994+ USE_SELENIUM="2" \
975995 # Default chrome flavor, options no longer avariable: beta|unstable
976996 CHROME_FLAVOR="stable" \
977997 # Randomize all ports, i.e. pick unused unprivileged ones
@@ -1017,7 +1037,7 @@ ENV FIREFOX_VERSION="${FF_VER}" \
10171037 SELENIUM_NODE_PARAMS="" \
10181038 SELENIUM_NODE_PROXY_PARAMS="" \
10191039 # To taggle issue #58 see https://goo.gl/fz6RTu
1020- CHROME_ARGS="--no-sandbox" \
1040+ CHROME_ARGS="--no-sandbox --disable-gpu " \
10211041 # Will be passed with: -Dwebdriver.chrome.verboseLogging
10221042 CHROME_VERBOSELOGGING="true" \
10231043 # e.g. CHROME_ARGS="--no-sandbox --ignore-certificate-errors" \
0 commit comments