From b72e144cd105dc2e765b7b3bc8c9e0e1c16f39da Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Fri, 23 Feb 2024 04:14:29 +0530 Subject: [PATCH] test: fix failed test due to element obscured Signed-off-by: Viet Nguyen Duc --- tests/SeleniumTests/__init__.py | 1 + tests/bootstrap.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index c5cd0eab7..c7a64e0cf 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -87,6 +87,7 @@ def test_download_file(self): file_link = wait.until( EC.element_to_be_clickable((By.LINK_TEXT, file_name)) ) + driver.execute_script("arguments[0].scrollIntoView();", file_link) file_link.click() wait.until( lambda d: str(d.get_downloadable_files()[0]).endswith(file_name) diff --git a/tests/bootstrap.sh b/tests/bootstrap.sh index df744cea8..fa2baf05c 100755 --- a/tests/bootstrap.sh +++ b/tests/bootstrap.sh @@ -7,7 +7,7 @@ if [ "${CI:-false}" = "false" ]; then source docker-selenium-tests/bin/activate fi -python -m pip install selenium==4.18.0 \ +python -m pip install selenium==4.18.1 \ docker===6.1.3 \ | grep -v 'Requirement already satisfied'