From cf777549f51479e404a019f88558650c1b6e6d0a Mon Sep 17 00:00:00 2001 From: Fried Hoeben Date: Sun, 17 Dec 2023 22:52:23 +0100 Subject: [PATCH] make test more robust --- tests/SeleniumTests/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index fa95acefaf..c74b0d98b9 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -80,7 +80,7 @@ def test_download_file(self): if is_continue: file_link.click() wait.until( - lambda d: str(d.get_downloadable_files()[0]).endswith(file_name) + lambda d: len(d.get_downloadable_files()) > 0 and str(d.get_downloadable_files()[0]).endswith(file_name) ) self.assertTrue(str(driver.get_downloadable_files()[0]).endswith(file_name))