From 745b94c97f8fb9596104908b551953c1cc00f54a Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 8 Dec 2023 10:12:24 +0530 Subject: [PATCH] Update to Selenium 4.16.1 Signed-off-by: Viet Nguyen Duc --- Makefile | 2 +- tests/SeleniumTests/__init__.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8209db4c3..5df2eb27e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ NAME := $(or $(NAME),$(NAME),selenium) CURRENT_DATE := $(shell date '+%Y%m%d') BUILD_DATE := $(or $(BUILD_DATE),$(BUILD_DATE),$(CURRENT_DATE)) -VERSION := $(or $(VERSION),$(VERSION),4.16.0) +VERSION := $(or $(VERSION),$(VERSION),4.16.1) BASE_VERSION := $(or $(BASE_VERSION),$(BASE_VERSION),4.16.1) BASE_RELEASE := $(or $(BASE_RELEASE),$(BASE_RELEASE),selenium-4.16.0) TAG_VERSION := $(VERSION)-$(BUILD_DATE) diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index 263cc11ca..4cd1445a3 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -77,7 +77,7 @@ def test_download_file(self): wait.until( lambda d: str(d.get_downloadable_files()[0]).endswith(file_name) ) - time.sleep(5) + sleep(5) self.assertTrue(str(driver.get_downloadable_files()[0]).endswith(file_name)) def tearDown(self): @@ -88,6 +88,7 @@ class ChromeTests(SeleniumGenericTests): def setUp(self): options = ChromeOptions() options.enable_downloads = True + options.add_argument('disable-features=DownloadBubble,DownloadBubbleV2') self.driver = webdriver.Remote( options=options, command_executor="http://%s:%s" % (SELENIUM_GRID_HOST,SELENIUM_GRID_PORT) @@ -97,6 +98,7 @@ class EdgeTests(SeleniumGenericTests): def setUp(self): options = EdgeOptions() options.enable_downloads = True + options.add_argument('disable-features=DownloadBubble,DownloadBubbleV2') self.driver = webdriver.Remote( options=options, command_executor="http://%s:%s" % (SELENIUM_GRID_HOST,SELENIUM_GRID_PORT) @@ -105,7 +107,11 @@ def setUp(self): class FirefoxTests(SeleniumGenericTests): def setUp(self): + profile = webdriver.FirefoxProfile() + profile.set_preference("browser.download.manager.showWhenStarting", False) + profile.set_preference("browser.helperApps.neverAsk.saveToDisk", "*/*") options = FirefoxOptions() + options.profile = profile options.enable_downloads = True self.driver = webdriver.Remote( options=options,