Skip to content

Commit 9b834bc

Browse files
committed
vs/ test pdf download
1 parent d8ef10d commit 9b834bc

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

tests/pdf_viewer/test_pdf_download.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
import os
2-
import time
32
import platform
3+
import time
4+
45
import pytest
6+
from pynput.keyboard import Controller, Key
57
from selenium.webdriver import Firefox
68
from selenium.webdriver.common.by import By
7-
from pynput.keyboard import Controller, Key
89

910
from modules.browser_object_navigation import Navigation
1011
from modules.page_object import GenericPdf
1112

13+
1214
@pytest.fixture()
1315
def add_prefs():
1416
return []
1517

18+
1619
def test_pdf_download(driver: Firefox, fillable_pdf_url: str):
1720
"""
1821
C3932: PDF files can be successfully downloaded via pdf.js
@@ -49,6 +52,10 @@ def test_pdf_download(driver: Firefox, fillable_pdf_url: str):
4952
saved_pdf_location = f"/home/{user}/Downloads/{file_name}"
5053

5154
# Verify if the file exists
52-
assert os.path.exists(saved_pdf_location), f"The file was not downloaded to {saved_pdf_location}."
55+
assert os.path.exists(
56+
saved_pdf_location
57+
), f"The file was not downloaded to {saved_pdf_location}."
5358

54-
print(f"Test passed: The file {file_name} has been downloaded and is present at {saved_pdf_location}.")
59+
print(
60+
f"Test passed: The file {file_name} has been downloaded and is present at {saved_pdf_location}."
61+
)

0 commit comments

Comments
 (0)