Skip to content

Commit 293a752

Browse files
committed
Use existing method
1 parent c65ad44 commit 293a752

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tests/downloads/test_download_pdf.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,16 @@ def test_download_pdf(
3838
"""
3939

4040
# Initialize objects
41-
pdf = GenericPdf(driver, pdf_url=fillable_pdf_url)
41+
pdf_page = GenericPdf(driver, pdf_url=fillable_pdf_url)
4242
keyboard = Controller()
4343

4444
# Click the download button
45-
pdf.open()
46-
download_button = pdf.get_element("download-button")
47-
download_button.click()
45+
pdf_page.open()
46+
pdf_page.click_download_button()
4847

4948
# Allow time for the download dialog to appear and pressing handle the prompt
5049
time.sleep(2)
51-
pdf.handle_os_download_confirmation(keyboard, sys_platform)
50+
pdf_page.handle_os_download_confirmation(keyboard, sys_platform)
5251

5352
# Set the expected download path and the expected PDF name
5453
file_name = "i-9.pdf"

0 commit comments

Comments
 (0)