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))