Skip to content

Commit ba22be7

Browse files
committed
Revert test to initial state
1 parent 940514d commit ba22be7

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

tests/downloads/test_download_pdf_from_context_menu.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,18 @@ def test_download_pdf_from_context_menu(
2828
):
2929
"""
3030
C1756790: Verify that Telemetry is Recorded when Saving a PDF from the Context menu
31-
32-
Notes:
33-
- Firefox is launched with a new profile (also a test case precondition) that has default download settings.
34-
- This means the OS-level "Save File" dialog will appear for every download.
35-
- Selenium cannot interact with this native dialog directly, so the test
36-
must rely on fixed waits to give the OS time to render the dialog and to
37-
finish writing the file.
3831
"""
3932

4033
from pynput.keyboard import Controller
4134

42-
# Initialize objects
4335
pdf = GenericPdf(driver, pdf_url=fillable_pdf_url)
44-
keyboard = Controller()
45-
context_menu = ContextMenu(driver)
46-
about_telemetry = AboutTelemetry(driver)
47-
48-
# Open the PDF file, right-click on the body of the file and select "Save page as"
4936
pdf.open()
37+
keyboard = Controller()
5038
body = pdf.get_element("pdf-body")
39+
40+
# Right-click on the body of the file and select Save page as
5141
pdf.context_click(body)
42+
context_menu = ContextMenu(driver)
5243
context_menu.click_and_hide_menu("context-menu-save-page-as")
5344

5445
# Allow time for the save dialog to appear and handle prompt
@@ -60,7 +51,7 @@ def test_download_pdf_from_context_menu(
6051
sleep(3)
6152

6253
# Open about:telemetry and go to events tab
63-
about_telemetry.open()
54+
about_telemetry = AboutTelemetry(driver).open()
6455
about_telemetry.get_element("events-tab").click()
6556

6657
# Verify that Telemetry is recorded

0 commit comments

Comments
 (0)