From 6b6ca9e26c5193e1920f65adfac2fd4b15c2f341 Mon Sep 17 00:00:00 2001 From: astebenkova Date: Fri, 30 Jun 2023 13:58:10 +0300 Subject: [PATCH] [osh-selenium] Migrate deprecated functions There are some leftovers from the following commit: https://review.opendev.org/c/openstack/openstack-helm-infra/+/883894 Change-Id: If167646b088b361d49d33400abab131c79afedc9 --- tools/gate/selenium/seleniumtester.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gate/selenium/seleniumtester.py b/tools/gate/selenium/seleniumtester.py index c424e01da..185a235d2 100644 --- a/tools/gate/selenium/seleniumtester.py +++ b/tools/gate/selenium/seleniumtester.py @@ -18,6 +18,7 @@ from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.chrome.options import Options +from selenium.webdriver.chrome.service import Service from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import ScreenshotException @@ -59,7 +60,8 @@ class SeleniumTester(): options.add_argument('--headless') options.add_argument('--no-sandbox') options.add_argument('--window-size=1920x1080') - browser = webdriver.Chrome(self.chrome_driver, chrome_options=options) + service = Service(executable_path=self.chrome_driver) + browser = webdriver.Chrome(service=service, options=options) return browser def initialize_artifiacts_dir(self):