From 2df558d2427af2e250f6fd7291d1d3f793ce3e1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Kn=C3=B6ppler?= <6317548+theCalcaholic@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:28:15 +0200 Subject: [PATCH] tests: Remove deprecated syntax for headless option MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Tobias Knöppler <6317548+theCalcaholic@users.noreply.github.com> --- tests/activation_tests.py | 4 ++-- tests/nextcloud_tests.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/activation_tests.py b/tests/activation_tests.py index 7e871e595..e45ad65de 100755 --- a/tests/activation_tests.py +++ b/tests/activation_tests.py @@ -163,13 +163,13 @@ def test_activation(IP, nc_port, admin_port, options, wait_timeout=120): sys.exit(2) arg_timeout = 120 - options = Options() + options = webdriver.FirefoxOptions() for opt, arg in opts: if opt in ('-h', '--help'): usage() sys.exit(2) elif opt == '--no-gui': - options.headless = True + options.add_argument("-headless") elif opt in ('-t', '--timeout'): arg_timeout = int(arg) else: diff --git a/tests/nextcloud_tests.py b/tests/nextcloud_tests.py index 96e0dc8a2..6eac08535 100755 --- a/tests/nextcloud_tests.py +++ b/tests/nextcloud_tests.py @@ -279,7 +279,7 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver): usage() sys.exit(2) - options = Options() + options = webdriver.FirefoxOptions() for opt, arg in opts: if opt in ('-h', '--help'): usage() @@ -288,7 +288,7 @@ def test_nextcloud(IP: str, nc_port: str, driver: WebDriver): if os.path.exists(test_cfg): os.unlink(test_cfg) elif opt == '--no-gui': - options.headless = True + options.add_argument("-headless") else: usage() sys.exit(2)