Skip to content
This repository was archived by the owner on Jun 22, 2024. It is now read-only.

Commit 8912ca0

Browse files
Fixed tests by waiting for downloadable files to exist in array, fixes Chromium tests.
Co-authored-by: Fried Hoeben <[email protected]>
1 parent 8b1a1b1 commit 8912ca0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/SeleniumTests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def test_download_file(self):
7575
)
7676
file_link.click()
7777
wait.until(
78-
lambda d: str(d.get_downloadable_files()[0]).endswith(file_name)
78+
lambda d: len(d.get_downloadable_files()) > 0 and str(d.get_downloadable_files()[0]).endswith(file_name)
7979
)
8080
time.sleep(5)
8181
self.assertTrue(str(driver.get_downloadable_files()[0]).endswith(file_name))

0 commit comments

Comments
 (0)