|
4 | 4 | import pytest |
5 | 5 | from selenium.webdriver import Firefox |
6 | 6 |
|
7 | | -from modules.browser_object_context_menu import ContextMenu |
8 | 7 | from modules.browser_object_navigation import Navigation |
9 | 8 | from modules.page_object_generics import GenericPage |
10 | 9 | from modules.page_object_prefs import AboutPrefs |
@@ -50,26 +49,24 @@ def test_add_zip_type( |
50 | 49 | """ |
51 | 50 | C1756743: Verify that the user can add the .zip mime type to Firefox |
52 | 51 | """ |
53 | | - # instantiate object |
54 | | - web_page = GenericPage(driver, url=ZIP_URL).open() |
| 52 | + # Instantiate objects |
| 53 | + web_page = GenericPage(driver, url=ZIP_URL) |
55 | 54 | nav = Navigation(driver) |
56 | | - context_menu = ContextMenu(driver) |
57 | 55 | about_prefs = AboutPrefs(driver, category="general") |
58 | 56 |
|
59 | 57 | web_page.elements |= temp_selectors |
60 | 58 |
|
61 | 59 | # Click on the available zip |
| 60 | + web_page.open() |
62 | 61 | web_page.click_on("github-code-button") |
63 | 62 | web_page.click_on("github-download-button") |
64 | 63 |
|
65 | 64 | # In the download panel right-click on the download and click "Always Open Similar Files" |
66 | | - with driver.context(driver.CONTEXT_CHROME): |
67 | | - nav.context_click(nav.get_element("download-panel-item")) |
68 | | - context_menu.get_element("context-menu-always-open-similar-files").click() |
| 65 | + nav.set_always_open_similar_files() |
69 | 66 |
|
70 | 67 | # Open about:preferences and check that zip mime type is present in the application list |
71 | 68 | about_prefs.open() |
72 | | - about_prefs.element_exists("mime-type-item", labels=["application/zip"]) |
| 69 | + about_prefs.get_app_name_for_mime_type("application/zip") |
73 | 70 |
|
74 | 71 | # Remove the directory created as MacOS automatically unzips |
75 | 72 | if sys_platform == "Darwin": |
|
0 commit comments