From 96686e1328c19b7bccd57bb4209e67f73681b674 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Wed, 3 Jan 2024 14:11:25 +0100 Subject: [PATCH] Fix Headless Firefox in Selenium Tests With new versions of Selenium, the way headless mode is invoked has changed: - https://www.selenium.dev/blog/2023/headless-is-going-away/ This pull request fixes the Selenium code so that the tests continue to work on our CI system. --- .github/requirements.txt | 2 +- .github/selenium-tests | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/requirements.txt b/.github/requirements.txt index 4a21f752..35f3392d 100644 --- a/.github/requirements.txt +++ b/.github/requirements.txt @@ -3,4 +3,4 @@ coverage coveralls flake8 mock -selenium +selenium>=4.13.0 diff --git a/.github/selenium-tests b/.github/selenium-tests index 451706d1..388c4fa1 100755 --- a/.github/selenium-tests +++ b/.github/selenium-tests @@ -46,7 +46,7 @@ def check_pyca(): if __name__ == '__main__': options = webdriver.FirefoxOptions() if sys.argv[-1] != 'gui': - options.headless = True + options.add_argument('--headless') driver = webdriver.Firefox(options=options) check_pyca() driver.close()