Skip to content

Commit

Permalink
Update selenium tests' dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
abotalov committed Aug 3, 2018
1 parent b6cb655 commit 6a23f86
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
4 changes: 2 additions & 2 deletions Dockerfile-selenium
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Copyright (C) 2018 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>

ARG CHROME_CT_VERSION="3.11.0"
ARG CHROME_CT_VERSION="3.13.0"
FROM selenium/standalone-chrome:${CHROME_CT_VERSION}

USER root
Expand All @@ -19,7 +19,7 @@ USER seluser

# Specify version of Chrome webdriver using 'CHROME_DRIVER_VERSION' argument
# Latest released version will be used by default
ARG CHROME_DRIVER_VERSION="2.37"
ARG CHROME_DRIVER_VERSION="2.41"
RUN CD_VER=$(if [ ${CHROME_DRIVER_VERSION:-latest} = "latest" ]; then echo\
$(wget -qO- https://chromedriver.storage.googleapis.com/LATEST_RELEASE); \
else echo $CHROME_DRIVER_VERSION; fi) \
Expand Down
18 changes: 9 additions & 9 deletions src/requirements-selenium.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@

inflection==0.3.1
nerodia==0.9.0
pytest==3.5.0
pytest==3.6.4
pytest-cov==2.5.1
pytest-env==0.6.2
pytest-html==1.17.0
pytest-html==1.19.0
pytest-pycharm==0.5.0
pytest-repeat==0.4.1
pytest-rerunfailures==4.0
pytest-selenium==1.12.0
pytest-xdist==1.22.2
python-dateutil==2.7.1
requests==2.18.4
selenium==3.11.0
pytest-repeat==0.6.0
pytest-rerunfailures==4.1
pytest-selenium==1.13.0
pytest-xdist==1.22.5
python-dateutil==2.7.3
requests==2.19.1
selenium==3.14.0
waiting==1.4.1
11 changes: 2 additions & 9 deletions test/selenium/src/lib/utils/selenium_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,16 +352,9 @@ def set_chrome_download_location(driver, download_dir):
"""Headless Chrome doesn't support download.default_directory preference.
Downloads are disallowed by default.
In order to allow a download we should send a command that will allow them.
Language bindings currently don't have this possibility.
"""
# pylint: disable=protected-access
driver.command_executor._commands["send_command"] = (
"POST", "/session/{}/chromium/send_command".format(driver.session_id))
params = {
"cmd": "Page.setDownloadBehavior",
"params": {"behavior": "allow", "downloadPath": download_dir}
}
driver.execute("send_command", params)
cmd_args = {"behavior": "allow", "downloadPath": download_dir}
driver.execute_cdp_cmd("Page.setDownloadBehavior", cmd_args)


def is_headless_chrome(pytestconfig):
Expand Down

0 comments on commit 6a23f86

Please sign in to comment.