From c1316dcbb1d108b363e3230c13018ec723046907 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:29:38 -0700 Subject: [PATCH 01/41] stabilize autofill tests --- modules/data/about_prefs.components.json | 14 +++- modules/page_object_autofill.py | 24 ++++-- modules/page_object_prefs.py | 22 ++---- tests/form_autofill/conftest.py | 2 + .../test_improved_type_control_panel.py | 77 ++++++++++++++----- 5 files changed, 96 insertions(+), 43 deletions(-) diff --git a/modules/data/about_prefs.components.json b/modules/data/about_prefs.components.json index 2b2d50092..6c9a8125d 100644 --- a/modules/data/about_prefs.components.json +++ b/modules/data/about_prefs.components.json @@ -45,12 +45,12 @@ "groups": [] }, "save-and-fill-addresses": { - "selectorData": "checkbox[label='Save and fill addresses']", + "selectorData": "[data-l10n-id='autofill-addresses-checkbox-message']", "strategy": "css", "groups": [] }, "save-and-fill-payment-methods": { - "selectorData": "checkbox[label='Save and fill payment methods']", + "selectorData": "[data-l10n-id='autofill-payment-methods-checkbox-message-2']", "strategy": "css", "groups": [] }, @@ -59,6 +59,16 @@ "strategy": "css", "groups": [] }, + "saved-payments-button": { + "selectorData": "[data-l10n-id='autofill-payment-methods-manage-payments-button']", + "strategy": "css", + "groups": [] + }, + "saved-addresses-button": { + "selectorData": "[data-l10n-id='autofill-addresses-manage-addresses-button']", + "strategy": "css", + "groups": [] + }, "import-browser-data": { "selectorData": "button[id='data-migration']", "strategy": "css", diff --git a/modules/page_object_autofill.py b/modules/page_object_autofill.py index 146711485..bb198ac54 100644 --- a/modules/page_object_autofill.py +++ b/modules/page_object_autofill.py @@ -807,22 +807,34 @@ def submit(self) -> None: self.submit_button = self.parent.get_element("submit-button-login") self.submit_button.click() - def verify_password_value(self, expected_password: str, field: str = "password-login-field"): + def verify_password_value( + self, expected_password: str, field: str = "password-login-field" + ): """Wait until the password field contains the expected value.""" element = self.parent.get_element(field) - self.parent.wait.until(lambda _: element.get_attribute("value") == expected_password) + self.parent.wait.until( + lambda _: element.get_attribute("value") == expected_password + ) return element - def verify_username_value(self, expected_username: str, field: str = "username-login-field"): + def verify_username_value( + self, expected_username: str, field: str = "username-login-field" + ): """Wait until the username field contains the expected value.""" element = self.parent.get_element(field) - self.parent.wait.until(lambda _: element.get_attribute("value") == expected_username) + self.parent.wait.until( + lambda _: element.get_attribute("value") == expected_username + ) return element - def verify_password_length(self, expected_length: int = 8, field: str = "password-login-field"): + def verify_password_length( + self, expected_length: int = 8, field: str = "password-login-field" + ): """Wait until the password field contains the expected number of characters.""" element = self.parent.get_element(field) - self.parent.wait.until(lambda _: len(element.get_attribute("value")) == expected_length) + self.parent.wait.until( + lambda _: len(element.get_attribute("value")) == expected_length + ) return element def verify_field_empty(self, field: str): diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 9f0528e16..d84c84850 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -204,12 +204,6 @@ def verify_cc_edit_saved_payments_profile( assert field_value != expected_cvv, "CVV is displayed." return self - def get_saved_payments_popup(self) -> WebElement: - """ - Open saved payments dialog panel - """ - return self.get_element("prefs-button", labels=["Saved payment methods"]) - def click_edit_on_dialog_element(self): """ Click on edit button on dialog panel @@ -283,7 +277,11 @@ def add_entry_to_saved_payments(self, cc_data: CreditCardBase): def close_dialog_box(self): """Close dialog box for saved addresses or payments.""" self.element_clickable("panel-popup-button", labels=["close-button"]) - self.get_element("panel-popup-button", labels=["close-button"]).click() + self.click_on("panel-popup-button", labels=["close-button"]) + if self.get_element( + "panel-popup-button", labels=["close-button"] + ).is_displayed(): + self.click_on("panel-popup-button", labels=["close-button"]) return self def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: @@ -317,12 +315,6 @@ def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: self.get_element("save-button").click() return self - def get_saved_addresses_popup(self) -> WebElement: - """ - Returns saved addresses button element - """ - return self.get_element("prefs-button", labels=["Saved addresses"]) - def open_and_switch_to_saved_addresses_popup(self) -> BasePage: """ Open and Switch to saved addresses popup frame. @@ -420,7 +412,7 @@ def get_saved_payments_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_payments_popup().click() + self.click_on("saved-payments-button") iframe = self.get_element("browser-popup") return iframe @@ -444,7 +436,7 @@ def get_saved_addresses_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_addresses_popup().click() + self.click_on("saved-addresses-button") iframe = self.get_element("browser-popup") return iframe diff --git a/tests/form_autofill/conftest.py b/tests/form_autofill/conftest.py index f7006beb3..2cdf5d15d 100644 --- a/tests/form_autofill/conftest.py +++ b/tests/form_autofill/conftest.py @@ -19,6 +19,8 @@ def prefs_list(add_to_prefs_list: dict): prefs = [ ("extensions.formautofill.creditCards.reauth.optout", False), ("extensions.formautofill.reauth.enabled", False), + ("extensions.formautofill.addresses.enabled", True), + ("extensions.formautofill.creditCards.enabled", True), ] prefs.extend(add_to_prefs_list) return prefs diff --git a/tests/reader_view/test_improved_type_control_panel.py b/tests/reader_view/test_improved_type_control_panel.py index f253a2d91..b94c4d0d8 100644 --- a/tests/reader_view/test_improved_type_control_panel.py +++ b/tests/reader_view/test_improved_type_control_panel.py @@ -1,6 +1,6 @@ -import pytest from typing import Literal +import pytest from selenium.webdriver import Firefox from modules.browser_object import ReaderView @@ -25,8 +25,16 @@ def test_case() -> str: SliderDirection = Literal["decrease", "increase"] SIZE_CONTROLS: list[SizeControl] = ["minus", "plus"] -FONTS: list[Literal["sans-serif", "serif", "monospace"]] = ["sans-serif", "serif", "monospace"] -ALIGNMENTS: list[tuple[AlignKey, AlignCSS]] = [("left", "start"), ("right", "right"), ("center", "center")] +FONTS: list[Literal["sans-serif", "serif", "monospace"]] = [ + "sans-serif", + "serif", + "monospace", +] +ALIGNMENTS: list[tuple[AlignKey, AlignCSS]] = [ + ("left", "start"), + ("right", "right"), + ("center", "center"), +] SLIDER_DIRS: list[SliderDirection] = ["decrease", "increase"] @@ -49,7 +57,9 @@ def _css_int(util: Utilities, element, prop: str) -> int: @pytest.mark.ci @pytest.mark.parametrize("font", FONTS) -def test_type_control_panel_font(driver: Firefox, font: Literal["sans-serif", "serif", "monospace"]) -> None: +def test_type_control_panel_font( + driver: Firefox, font: Literal["sans-serif", "serif", "monospace"] +) -> None: """ C130919.1: Ensure the functionality of the type control panels works (font family). """ @@ -61,10 +71,14 @@ def test_type_control_panel_font(driver: Firefox, font: Literal["sans-serif", "s body = web_page.get_element("page-body") # Ensure default is sans-serif first so the next wait has a stable baseline - reader_view.wait.until(lambda _: "sans-serif" in body.value_of_css_property("font-family")) + reader_view.wait.until( + lambda _: "sans-serif" in body.value_of_css_property("font-family") + ) font_dropdown_root = reader_view.get_element("toolbar-font-selector") - font_dropdown = Dropdown(page=reader_view, require_shadow=False, root=font_dropdown_root) + font_dropdown = Dropdown( + page=reader_view, require_shadow=False, root=font_dropdown_root + ) font_dropdown.select_option( f"about-reader-font-type-{font}", option_tag="option", @@ -91,16 +105,20 @@ def test_type_control_panel_size(driver: Firefox, control: SizeControl) -> None: reader_view.get_element(f"toolbar-textsize-{control}").click() if control == "minus": - reader_view.wait.until(lambda _: _css_int(util, body, "--font-size") < size_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "--font-size") < size_before + ) else: - reader_view.wait.until(lambda _: _css_int(util, body, "--font-size") > size_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "--font-size") > size_before + ) @pytest.mark.parametrize("alignment,intended_alignment", ALIGNMENTS) def test_type_control_panel_text_alignment( - driver: Firefox, - alignment: AlignKey, - intended_alignment: AlignCSS, + driver: Firefox, + alignment: AlignKey, + intended_alignment: AlignCSS, ) -> None: """ C130919.3: Ensure the functionality of the type control panels works (text alignment). @@ -114,11 +132,16 @@ def test_type_control_panel_text_alignment( reader_view.open_advanced_options() reader_view.get_element(f"toolbar-text-align-{alignment}").click() - reader_view.wait.until(lambda _: container.value_of_css_property("--text-alignment") == intended_alignment) + reader_view.wait.until( + lambda _: container.value_of_css_property("--text-alignment") + == intended_alignment + ) @pytest.mark.parametrize("direction", SLIDER_DIRS) -def test_type_control_panel_content_width(driver: Firefox, direction: SliderDirection) -> None: +def test_type_control_panel_content_width( + driver: Firefox, direction: SliderDirection +) -> None: """ C130919.4: Ensure the functionality of the type control panels works (content width slider). """ @@ -137,13 +160,19 @@ def test_type_control_panel_content_width(driver: Firefox, direction: SliderDire reader_view.change_slider_value(slider, increase=(direction == "increase")) if direction == "decrease": - reader_view.wait.until(lambda _: _css_int(util, body, "--content-width") < width_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "--content-width") < width_before + ) else: - reader_view.wait.until(lambda _: _css_int(util, body, "--content-width") > width_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "--content-width") > width_before + ) @pytest.mark.parametrize("direction", SLIDER_DIRS) -def test_type_control_panel_line_spacing(driver: Firefox, direction: SliderDirection) -> None: +def test_type_control_panel_line_spacing( + driver: Firefox, direction: SliderDirection +) -> None: """ C130919.5: Ensure the functionality of the type control panels works (line spacing slider). """ @@ -162,9 +191,13 @@ def test_type_control_panel_line_spacing(driver: Firefox, direction: SliderDirec reader_view.change_slider_value(slider, increase=(direction == "increase")) if direction == "decrease": - reader_view.wait.until(lambda _: _css_int(util, body, "block-size") < block_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "block-size") < block_before + ) else: - reader_view.wait.until(lambda _: _css_int(util, body, "block-size") > block_before) + reader_view.wait.until( + lambda _: _css_int(util, body, "block-size") > block_before + ) def test_type_control_panel_character_spacing(driver: Firefox) -> None: @@ -186,7 +219,9 @@ def test_type_control_panel_character_spacing(driver: Firefox) -> None: reader_view.change_slider_value(slider, increase=True) - reader_view.wait.until(lambda _: _css_int(util, container, "--letter-spacing") > letter_before) + reader_view.wait.until( + lambda _: _css_int(util, container, "--letter-spacing") > letter_before + ) def test_type_control_panel_word_spacing(driver: Firefox) -> None: @@ -208,4 +243,6 @@ def test_type_control_panel_word_spacing(driver: Firefox) -> None: reader_view.change_slider_value(slider, increase=True) - reader_view.wait.until(lambda _: _css_int(util, container, "--word-spacing") > word_before) + reader_view.wait.until( + lambda _: _css_int(util, container, "--word-spacing") > word_before + ) From f89ac530db2e977f45637d3ad39f21509eebbef6 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:38:22 -0700 Subject: [PATCH 02/41] add selectors --- SELECTOR_INFO.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 70e467847..8b3105bf3 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -495,14 +495,14 @@ Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-addresses -Selector Data: "checkbox[label='Save and fill addresses']" +Selector Data: "[data-l10n-id='autofill-addresses-checkbox-message']" Description: Label for Autofill > Save and fill addresses option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-payment-methods -Selector Data: "checkbox[label='Save and fill payment methods']" +Selector Data: "[data-l10n-id='autofill-payment-methods-checkbox-message-2']" Description: Label for Autofill > Save and fill payment methods option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json @@ -515,6 +515,20 @@ Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` +Selector Name: saved-payments-button +Selector Data: "[data-l10n-id='autofill-payment-methods-manage-payments-button']" +Description: Embedded button/label for "Manage Saved Payments" +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` +Selector Name: saved-addresses-button +Selector Data: "[data-l10n-id='autofill-addresses-manage-addresses-button']" +Description: Embedded button/label for "Manage Addresses and more..." +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` Selector Name: import-browser-data Selector Data: "button[id='data-migration']" Description: Import Browser Data > Import Data button From 45bf766ca85fe68f251112f0e9fd684d22d70dcb Mon Sep 17 00:00:00 2001 From: soncuteanca <141660365+soncuteanca@users.noreply.github.com> Date: Tue, 14 Oct 2025 13:30:46 +0300 Subject: [PATCH 03/41] Anca/ Stabilization on allow audio-video (#834) * Stabilization on allow audio-video * Remove unused imports * Skip test on Win with a clear reason --- .../test_allow_audio_video_functionality.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/audio_video/test_allow_audio_video_functionality.py b/tests/audio_video/test_allow_audio_video_functionality.py index c74c5e032..9826a0dc8 100644 --- a/tests/audio_video/test_allow_audio_video_functionality.py +++ b/tests/audio_video/test_allow_audio_video_functionality.py @@ -15,12 +15,12 @@ def test_case(): WIN_GHA = environ.get("GITHUB_ACTIONS") == "true" and sys.platform.startswith("win") +TEST_URL = "https://www.w3schools.com/html/mov_bbb.mp4" -TEST_URL = "https://www.mlb.com/video/rockies-black-agree-on-extension" - - -@pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows Github Actions") +@pytest.mark.skipif( + WIN_GHA, reason="Audio playback not supported in Windows CI environment" +) @pytest.mark.audio @pytest.mark.noxvfb def test_allow_audio_video_functionality(driver: Firefox): @@ -32,9 +32,11 @@ def test_allow_audio_video_functionality(driver: Firefox): tabs = TabBar(driver) page = GenericPage(driver, url=TEST_URL) - # Open privacy and click on the "Settings" button from Autoplay + # Open privacy and security preferences and set 'Allow Audio and Video' for autoplay about_prefs.set_autoplay_setting_in_preferences("allow-audio-video") - # Open the website and check if the video starts playing with sound + # Open the website in a new tab and check if the video starts playing with sound + tabs.new_tab_by_button() + tabs.switch_to_new_tab() page.open() - tabs.expect_tab_sound_status(1, tabs.MEDIA_STATUS.PLAYING) + tabs.expect_tab_sound_status(2, tabs.MEDIA_STATUS.PLAYING) From 63397ea78cbca5479d5e7ecbfcb00be3aef7bca2 Mon Sep 17 00:00:00 2001 From: Hani Yacoub Date: Tue, 14 Oct 2025 15:49:15 +0300 Subject: [PATCH 04/41] Hani/ Refactor tabs batch 2 (#824) * Refactor tabs batch 2 * Skip a test * fix test open new via hyperlink * replace more-information with learn-more --------- Co-authored-by: Hani Yacoub --- SELECTOR_INFO.md | 6 ++--- modules/browser_object_panel_ui.py | 2 +- modules/data/example_page.components.json | 4 ++-- modules/data/panel_ui.components.json | 2 +- tests/menus/test_hyperlink_context_menu.py | 2 +- tests/menus/test_tab_context_menu_close.py | 2 +- .../test_open_link_in_private_window.py | 2 +- ..._open_new_bg_tab_via_mouse_and_keyboard.py | 4 ++-- tests/tabs/test_open_new_tab_via_hyperlink.py | 17 ++++++++----- tests/tabs/test_pin_tab.py | 16 +++++++------ .../test_reopen_tab_through_context_menu.py | 23 +++++++++++------- .../test_reopen_tab_through_history_menu.py | 24 ++++++++++--------- 12 files changed, 59 insertions(+), 45 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 70e467847..9d6279573 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -1833,8 +1833,8 @@ Location: Any non-linked content space inside example.com page Path to .json: modules/data/exemple_page.components.json ``` ``` -Selector Name: more-information -Selector Data: "More information..." +Selector Name: learn-more +Selector Data: "Learn more" Description: More information..." link Location: The hyperlink positioned in the middle of example.com page Path to .json: modules/data/exemple_page.components.json @@ -3238,7 +3238,7 @@ Path to .json: modules/data/panel_ui.components.json ``` ``` Selector name: panel-ui-history-recently-closed-reopen-tabs -Selector Data: toolbarbutton[class='restoreallitem subviewbutton panel-subview-footer-button'] +Selector Data: toolbarbutton[class='subviewbutton subviewbutton-nav'][label='Recently closed tabs'] Description: Recently closed reopen tabs Location: On the hamburger menu > History Path to .json: modules/data/panel_ui.components.json diff --git a/modules/browser_object_panel_ui.py b/modules/browser_object_panel_ui.py index 711509fb9..d64527f7c 100644 --- a/modules/browser_object_panel_ui.py +++ b/modules/browser_object_panel_ui.py @@ -171,7 +171,7 @@ def reopen_recently_closed_tabs(self) -> BasePage: self.click_on("panel-ui-history") self.click_on("panel-ui-history-recently-closed") - if self.sys_platform() == "Linux": + if self.sys_platform() in ("Linux", "Darwin"): sleep(2) self.click_on("panel-ui-history-recently-closed-reopen-tabs") diff --git a/modules/data/example_page.components.json b/modules/data/example_page.components.json index d8cc5339f..1333ea853 100644 --- a/modules/data/example_page.components.json +++ b/modules/data/example_page.components.json @@ -14,8 +14,8 @@ ] }, - "more-information": { - "selectorData": "More information...", + "learn-more": { + "selectorData": "Learn more", "strategy": "link_text", "groups": [] } diff --git a/modules/data/panel_ui.components.json b/modules/data/panel_ui.components.json index 4be365c5e..8011674e1 100644 --- a/modules/data/panel_ui.components.json +++ b/modules/data/panel_ui.components.json @@ -133,7 +133,7 @@ }, "panel-ui-history-recently-closed-reopen-tabs": { - "selectorData": "toolbarbutton[class='restoreallitem subviewbutton panel-subview-footer-button']", + "selectorData": "toolbarbutton[class='subviewbutton subviewbutton-nav'][label='Recently closed tabs']", "strategy": "css", "groups": [] }, diff --git a/tests/menus/test_hyperlink_context_menu.py b/tests/menus/test_hyperlink_context_menu.py index c58f77b79..360b3980c 100644 --- a/tests/menus/test_hyperlink_context_menu.py +++ b/tests/menus/test_hyperlink_context_menu.py @@ -20,7 +20,7 @@ def test_open_link_in_new_window(driver: Firefox): example.open() # right click the hyperlink - example.context_click("more-information") + example.context_click("learn-more") # click on the open in new window option hyperlink_context.click_and_hide_menu("context-menu-open-link-in-new-window") diff --git a/tests/menus/test_tab_context_menu_close.py b/tests/menus/test_tab_context_menu_close.py index 4957ec51f..9f14c41a0 100644 --- a/tests/menus/test_tab_context_menu_close.py +++ b/tests/menus/test_tab_context_menu_close.py @@ -97,7 +97,7 @@ def test_copy_link(driver: Firefox): # right click the hyperlink sleep(1) - example.context_click("more-information") + example.context_click("learn-more") # click on the open in new window option sleep(1) diff --git a/tests/security_and_privacy/test_open_link_in_private_window.py b/tests/security_and_privacy/test_open_link_in_private_window.py index ee6f5aa5a..f2c4004a6 100644 --- a/tests/security_and_privacy/test_open_link_in_private_window.py +++ b/tests/security_and_privacy/test_open_link_in_private_window.py @@ -20,7 +20,7 @@ def test_open_link_in_private_window(driver: Firefox): nav = Navigation(driver) sleep(1) - example.context_click("more-information") + example.context_click("learn-more") sleep(1) context_menu.click_and_hide_menu("context-menu-open-link-in-new-private-window") diff --git a/tests/tabs/test_open_new_bg_tab_via_mouse_and_keyboard.py b/tests/tabs/test_open_new_bg_tab_via_mouse_and_keyboard.py index 6f7369044..45d726dc3 100644 --- a/tests/tabs/test_open_new_bg_tab_via_mouse_and_keyboard.py +++ b/tests/tabs/test_open_new_bg_tab_via_mouse_and_keyboard.py @@ -21,7 +21,7 @@ def test_open_new_bg_tab_via_mouse_and_keyboard(driver: Firefox): example.open() # Middle click link, verify new background tab opens with correct URL - example.middle_click("more-information") + example.middle_click("learn-more") example.wait_for_num_tabs(2) example.switch_to_new_tab() @@ -32,7 +32,7 @@ def test_open_new_bg_tab_via_mouse_and_keyboard(driver: Firefox): example.switch_to_new_tab() # Control click link, verify new background tab opens with correct URL - example.control_click("more-information") + example.control_click("learn-more") example.wait_for_num_tabs(2) example.switch_to_new_tab() diff --git a/tests/tabs/test_open_new_tab_via_hyperlink.py b/tests/tabs/test_open_new_tab_via_hyperlink.py index 6377aced0..2c4a15b7c 100644 --- a/tests/tabs/test_open_new_tab_via_hyperlink.py +++ b/tests/tabs/test_open_new_tab_via_hyperlink.py @@ -5,6 +5,9 @@ from modules.page_object import ExamplePage +URL = "https://www.iana.org/help/example-domains" + + @pytest.fixture() def test_case(): return "134444" @@ -14,15 +17,17 @@ def test_open_new_via_hyperlink(driver: Firefox): """ C134444 - A hyperlink can be opened in a new tab """ - example = ExamplePage(driver).open() - # Use context menu option to open link in new tab - example.context_click("more-information") + # Instantiate objects + example = ExamplePage(driver) context_menu = ContextMenu(driver) - with driver.context(driver.CONTEXT_CHROME): - context_menu.click_and_hide_menu("context-menu-open-link-in-tab") + + # Use context menu option to open link in new tab + example.open() + example.context_click("learn-more") + context_menu.click_and_hide_menu("context-menu-open-link-in-tab") # Get the title of the new tab example.wait_for_num_tabs(2) example.switch_to_new_tab() - example.url_contains("https://www.iana.org/help/example-domains") + example.url_contains(URL) diff --git a/tests/tabs/test_pin_tab.py b/tests/tabs/test_pin_tab.py index 619ecd9e0..62f613ef6 100644 --- a/tests/tabs/test_pin_tab.py +++ b/tests/tabs/test_pin_tab.py @@ -4,6 +4,8 @@ from modules.browser_object import ContextMenu, TabBar +NUM_TABS = 5 + @pytest.fixture() def test_case(): return "134722" @@ -13,16 +15,16 @@ def test_pin_tab(driver: Firefox): """ C134722, ensures that tabs can be pinned """ + + # Instantiate objects tabs = TabBar(driver) tab_context_menu = ContextMenu(driver) - num_tabs = 5 - - # opening some tabs - for _ in range(num_tabs): + # Opening some tabs + for _ in range(NUM_TABS): tabs.new_tab_by_button() - # pin the 1st tab + # Pin the 1st tab first_tab = tabs.get_tab(1) tabs.context_click(first_tab) tab_context_menu.click_and_hide_menu("context-menu-pin-tab") @@ -30,11 +32,11 @@ def test_pin_tab(driver: Firefox): assert tabs.is_pinned(first_tab) # ensuring all the other tabs are not pinned - for i in range(2, num_tabs + 2): + for i in range(2, NUM_TABS + 2): tab = tabs.get_tab(i) assert not tabs.is_pinned(tab) - # unpinning the tab and ensuring it is no longer pinned + # Unpinning the tab and ensuring it is no longer pinned tabs.context_click(first_tab) tab_context_menu.click_and_hide_menu("context-menu-unpin-tab") diff --git a/tests/tabs/test_reopen_tab_through_context_menu.py b/tests/tabs/test_reopen_tab_through_context_menu.py index b28dd7e56..7af5ba868 100644 --- a/tests/tabs/test_reopen_tab_through_context_menu.py +++ b/tests/tabs/test_reopen_tab_through_context_menu.py @@ -4,6 +4,10 @@ from modules.browser_object import ContextMenu, TabBar +TABS_TO_OPEN = 4 +FIRST_URL = "about:about" +SECOND_URL = "about:robots" + @pytest.fixture() def test_case(): return "134648" @@ -11,27 +15,28 @@ def test_case(): def test_reopen_tab_through_context_menu(driver: Firefox): """C134648: Reopen tab through context menu""" + + # Instantiate objects tabs = TabBar(driver) tab_context_menu = ContextMenu(driver) - tabs_to_open = 4 - - driver.get("about:about") - for _ in range(1, tabs_to_open): + # Open several different tabs and close them + driver.get(FIRST_URL) + for _ in range(1, TABS_TO_OPEN): tabs.new_tab_by_button() driver.switch_to.window(driver.window_handles[-1]) - driver.get("about:robots") + driver.get(SECOND_URL) remaining_tab = tabs.get_tab(1) - closing_tab = tabs.get_tab(tabs_to_open) + closing_tab = tabs.get_tab(TABS_TO_OPEN) - with driver.context(driver.CONTEXT_CHROME): - assert tabs.get_tab_title(closing_tab).startswith("Gort") + assert tabs.get_tab_title(closing_tab).startswith("Gort") driver.close() driver.switch_to.window(driver.window_handles[0]) + # Right click on the remaining tab and reopen previously closed tab tabs.context_click(remaining_tab) tab_context_menu.click_and_hide_menu("context-menu-reopen-closed-tab") - reopened_tab = tabs.get_tab(tabs_to_open + 1) + reopened_tab = tabs.get_tab(TABS_TO_OPEN + 1) assert tabs.get_tab_title(reopened_tab).startswith("Gort") diff --git a/tests/tabs/test_reopen_tab_through_history_menu.py b/tests/tabs/test_reopen_tab_through_history_menu.py index bf7a40f63..53b8f37ab 100644 --- a/tests/tabs/test_reopen_tab_through_history_menu.py +++ b/tests/tabs/test_reopen_tab_through_history_menu.py @@ -12,7 +12,7 @@ def test_case(): return "134650" -links = [ +LINKS = [ "about:about", "about:addons", "about:cache", @@ -22,7 +22,8 @@ def test_case(): "about:blank", ] -link_set = set(links) +LINK_SET = set(LINKS) +NUM_TABS = 6 @pytest.mark.skipif( @@ -30,27 +31,28 @@ def test_case(): ) def test_reopen_tab_through_history_menu(driver: Firefox): """C134650 - Verify that the recently closed tab can be reopened from the history menu""" - # open 6 tabs + + # Instantiate objects tabs = TabBar(driver) panel = PanelUi(driver) - num_tabs = 6 - for i in range(num_tabs): - driver.get(links[i]) + # open 6 tabs + for i in range(NUM_TABS): + driver.get(LINKS[i]) tabs.new_tab_by_button() driver.switch_to.window(driver.window_handles[i + 1]) # close the first 6 tabs - for i in range(num_tabs): - tabs.close_tab(tabs.get_tab(num_tabs - i)) + for i in range(NUM_TABS): + tabs.close_tab(tabs.get_tab(NUM_TABS - i)) # open menu bar and reopen recently closed tabs panel.open() panel.reopen_recently_closed_tabs() # go through all the tabs and ensure they were the ones that were opened previously - for i in range(num_tabs): - driver.switch_to.window(driver.window_handles[i + 1]) + for i in range(NUM_TABS): + driver.switch_to.window(driver.window_handles[-1]) current_page = driver.current_url logging.info(f"The current URL is: {current_page}") - assert current_page in link_set + assert current_page in LINK_SET From 848c9eb8b5037f19ba4b7911b6e6e7f92da67c64 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 14 Oct 2025 10:21:25 -0500 Subject: [PATCH 05/41] Update example.com hyperlink (#835) Fixes several tests that access the example.com page hyperlink --- SELECTOR_INFO.md | 4 ++-- tests/menus/test_hyperlink_context_menu.py | 6 +++--- tests/menus/test_tab_context_menu_actions.py | 8 ++++---- tests/menus/test_tab_context_menu_close.py | 14 ++++++++------ tests/tabs/test_open_new_tab_via_hyperlink.py | 1 - tests/tabs/test_pin_tab.py | 2 +- tests/tabs/test_reopen_tab_through_context_menu.py | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 9d6279573..54fea6f27 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -1835,7 +1835,7 @@ Path to .json: modules/data/exemple_page.components.json ``` Selector Name: learn-more Selector Data: "Learn more" -Description: More information..." link +Description: "Learn more" link Location: The hyperlink positioned in the middle of example.com page Path to .json: modules/data/exemple_page.components.json ``` @@ -3238,7 +3238,7 @@ Path to .json: modules/data/panel_ui.components.json ``` ``` Selector name: panel-ui-history-recently-closed-reopen-tabs -Selector Data: toolbarbutton[class='subviewbutton subviewbutton-nav'][label='Recently closed tabs'] +Selector Data: toolbarbutton[class='restoreallitem subviewbutton panel-subview-footer-button'] Description: Recently closed reopen tabs Location: On the hamburger menu > History Path to .json: modules/data/panel_ui.components.json diff --git a/tests/menus/test_hyperlink_context_menu.py b/tests/menus/test_hyperlink_context_menu.py index 360b3980c..362eaae88 100644 --- a/tests/menus/test_hyperlink_context_menu.py +++ b/tests/menus/test_hyperlink_context_menu.py @@ -19,13 +19,13 @@ def test_open_link_in_new_window(driver: Firefox): example = ExamplePage(driver) example.open() - # right click the hyperlink + # Right-click the hyperlink example.context_click("learn-more") - # click on the open in new window option + # Click on the open in new window option hyperlink_context.click_and_hide_menu("context-menu-open-link-in-new-window") - # verify there are two instances (two windows) + # Verify there are two instances (two windows) tabs.wait_for_num_windows(2) driver.switch_to.window(driver.window_handles[1]) diff --git a/tests/menus/test_tab_context_menu_actions.py b/tests/menus/test_tab_context_menu_actions.py index 7da28305b..1eae831da 100644 --- a/tests/menus/test_tab_context_menu_actions.py +++ b/tests/menus/test_tab_context_menu_actions.py @@ -28,18 +28,18 @@ def test_duplicate_tab(driver: Firefox): tabs_to_open = 4 - # open some tabs + # Open some tabs for i in range(tabs_to_open): driver.get(links[i]) tabs.new_tab_by_button() driver.switch_to.window(driver.window_handles[i + 1]) - # context click + # Context click first_tab = tabs.get_tab(1) tabs.context_click(first_tab) tab_context_menu.click_and_hide_menu("context-menu-duplicate-tab") - # get the current tab and assert the url + # Get the current tab and assert the url driver.switch_to.window(driver.window_handles[tabs_to_open + 1]) current_page = driver.current_url assert current_page == links[0] @@ -54,7 +54,7 @@ def test_close_multiple_tabs_to_right(driver: Firefox): tabs_to_open = 4 - # open some tabs + # Open some tabs for i in range(tabs_to_open): driver.get(links[i]) tabs.new_tab_by_button() diff --git a/tests/menus/test_tab_context_menu_close.py b/tests/menus/test_tab_context_menu_close.py index 9f14c41a0..195932b70 100644 --- a/tests/menus/test_tab_context_menu_close.py +++ b/tests/menus/test_tab_context_menu_close.py @@ -93,27 +93,29 @@ def test_copy_link(driver: Firefox): nav = Navigation(driver) hyperlink_context = ContextMenu(driver) tabs = TabBar(driver) - example = ExamplePage(driver).open() + example = ExamplePage(driver) - # right click the hyperlink + example.open() + + # Right-click the hyperlink sleep(1) example.context_click("learn-more") - # click on the open in new window option + # Click on the open in new window option sleep(1) hyperlink_context.click_and_hide_menu("context-menu-copy-link") - # open a new tab + # Open a new tab tabs.new_tab_by_button() tabs.wait_for_num_tabs(2) sleep(1) driver.switch_to.window(driver.window_handles[1]) - # # context click and paste + # Context click and paste search_bar = nav.get_awesome_bar() nav.context_click(search_bar) - # paste and go + # Paste and go nav.click_and_hide_menu("context-menu-paste-and-go") example.title_contains(example.MORE_INFO_TITLE) diff --git a/tests/tabs/test_open_new_tab_via_hyperlink.py b/tests/tabs/test_open_new_tab_via_hyperlink.py index 2c4a15b7c..24932323d 100644 --- a/tests/tabs/test_open_new_tab_via_hyperlink.py +++ b/tests/tabs/test_open_new_tab_via_hyperlink.py @@ -4,7 +4,6 @@ from modules.browser_object import ContextMenu from modules.page_object import ExamplePage - URL = "https://www.iana.org/help/example-domains" diff --git a/tests/tabs/test_pin_tab.py b/tests/tabs/test_pin_tab.py index 62f613ef6..94f94809a 100644 --- a/tests/tabs/test_pin_tab.py +++ b/tests/tabs/test_pin_tab.py @@ -3,9 +3,9 @@ from modules.browser_object import ContextMenu, TabBar - NUM_TABS = 5 + @pytest.fixture() def test_case(): return "134722" diff --git a/tests/tabs/test_reopen_tab_through_context_menu.py b/tests/tabs/test_reopen_tab_through_context_menu.py index 7af5ba868..cf33e00a5 100644 --- a/tests/tabs/test_reopen_tab_through_context_menu.py +++ b/tests/tabs/test_reopen_tab_through_context_menu.py @@ -3,11 +3,11 @@ from modules.browser_object import ContextMenu, TabBar - TABS_TO_OPEN = 4 FIRST_URL = "about:about" SECOND_URL = "about:robots" + @pytest.fixture() def test_case(): return "134648" From aa949349a8ebb91f63c0b49e7a24028ba958d66e Mon Sep 17 00:00:00 2001 From: vsangereanMOZ Date: Tue, 14 Oct 2025 18:34:58 +0300 Subject: [PATCH 06/41] Vs/Add tests for seach modes persistance with @bing (#838) --- ...st_search_mode_persists_mixed_with_bing.py | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py diff --git a/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py new file mode 100644 index 000000000..9b98a46d2 --- /dev/null +++ b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py @@ -0,0 +1,44 @@ +import pytest +from selenium.webdriver import Firefox +from selenium.webdriver.common.keys import Keys + +from modules.browser_object_navigation import Navigation +from modules.page_object_generics import GenericPage + +@pytest.fixture() +def test_case(): + return "3028730" + +@pytest.mark.parametrize("engine", ["DuckDuckGo"]) +def test_search_mode_persists_mixed_with_bing(driver: Firefox, engine): + """ + TC 3028730: Ensure '@bing' is NOT recognized as a special Bing search when DuckDuckGo is selected. + """ + # Open a neutral page (new tab) and prepare helpers + page = GenericPage(driver, url="about:newtab") + nav = Navigation(driver) + + page.open() + + # Step 1: pick DuckDuckGo from the search mode switcher (aka USB) + nav.click_search_mode_switcher() + nav.set_search_mode(engine) + + # Step 2: type '@bing' in the Awesome Bar + nav.click_in_awesome_bar() + nav.type_in_awesome_bar("@bing") + + # Assert that the "tab to search" / alias UI is NOT shown for '@bing' + nav.element_not_visible("tab-to-search-text-span") + + # Step 3: continue typing any word and hit Enter + nav.type_in_awesome_bar(" test" + Keys.ENTER) + + # Expectation: a DuckDuckGo results page, with '@bing' included as plain text in the query. + page.url_contains("duckduckgo.com") + + # Verify '@bing' appears in the query (allowing for URL encoding) + current_url = driver.current_url + assert ("%40bing" in current_url) or ("@bing" in current_url), ( + f"@bing should be part of the search term, but URL was: {current_url}" + ) From c322021e0d15dfb180647d69f52225e9fb744d75 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:29:38 -0700 Subject: [PATCH 07/41] stabilize autofill tests --- modules/data/about_prefs.components.json | 14 ++++++++++++-- modules/page_object_prefs.py | 22 +++++++--------------- tests/form_autofill/conftest.py | 2 ++ 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/modules/data/about_prefs.components.json b/modules/data/about_prefs.components.json index 2b2d50092..6c9a8125d 100644 --- a/modules/data/about_prefs.components.json +++ b/modules/data/about_prefs.components.json @@ -45,12 +45,12 @@ "groups": [] }, "save-and-fill-addresses": { - "selectorData": "checkbox[label='Save and fill addresses']", + "selectorData": "[data-l10n-id='autofill-addresses-checkbox-message']", "strategy": "css", "groups": [] }, "save-and-fill-payment-methods": { - "selectorData": "checkbox[label='Save and fill payment methods']", + "selectorData": "[data-l10n-id='autofill-payment-methods-checkbox-message-2']", "strategy": "css", "groups": [] }, @@ -59,6 +59,16 @@ "strategy": "css", "groups": [] }, + "saved-payments-button": { + "selectorData": "[data-l10n-id='autofill-payment-methods-manage-payments-button']", + "strategy": "css", + "groups": [] + }, + "saved-addresses-button": { + "selectorData": "[data-l10n-id='autofill-addresses-manage-addresses-button']", + "strategy": "css", + "groups": [] + }, "import-browser-data": { "selectorData": "button[id='data-migration']", "strategy": "css", diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 9f0528e16..d84c84850 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -204,12 +204,6 @@ def verify_cc_edit_saved_payments_profile( assert field_value != expected_cvv, "CVV is displayed." return self - def get_saved_payments_popup(self) -> WebElement: - """ - Open saved payments dialog panel - """ - return self.get_element("prefs-button", labels=["Saved payment methods"]) - def click_edit_on_dialog_element(self): """ Click on edit button on dialog panel @@ -283,7 +277,11 @@ def add_entry_to_saved_payments(self, cc_data: CreditCardBase): def close_dialog_box(self): """Close dialog box for saved addresses or payments.""" self.element_clickable("panel-popup-button", labels=["close-button"]) - self.get_element("panel-popup-button", labels=["close-button"]).click() + self.click_on("panel-popup-button", labels=["close-button"]) + if self.get_element( + "panel-popup-button", labels=["close-button"] + ).is_displayed(): + self.click_on("panel-popup-button", labels=["close-button"]) return self def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: @@ -317,12 +315,6 @@ def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: self.get_element("save-button").click() return self - def get_saved_addresses_popup(self) -> WebElement: - """ - Returns saved addresses button element - """ - return self.get_element("prefs-button", labels=["Saved addresses"]) - def open_and_switch_to_saved_addresses_popup(self) -> BasePage: """ Open and Switch to saved addresses popup frame. @@ -420,7 +412,7 @@ def get_saved_payments_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_payments_popup().click() + self.click_on("saved-payments-button") iframe = self.get_element("browser-popup") return iframe @@ -444,7 +436,7 @@ def get_saved_addresses_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_addresses_popup().click() + self.click_on("saved-addresses-button") iframe = self.get_element("browser-popup") return iframe diff --git a/tests/form_autofill/conftest.py b/tests/form_autofill/conftest.py index f7006beb3..2cdf5d15d 100644 --- a/tests/form_autofill/conftest.py +++ b/tests/form_autofill/conftest.py @@ -19,6 +19,8 @@ def prefs_list(add_to_prefs_list: dict): prefs = [ ("extensions.formautofill.creditCards.reauth.optout", False), ("extensions.formautofill.reauth.enabled", False), + ("extensions.formautofill.addresses.enabled", True), + ("extensions.formautofill.creditCards.enabled", True), ] prefs.extend(add_to_prefs_list) return prefs From a0403af448c17ef2f9ecdc2a76592b5df760dd48 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:38:22 -0700 Subject: [PATCH 08/41] add selectors --- SELECTOR_INFO.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 54fea6f27..84b63802f 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -495,14 +495,14 @@ Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-addresses -Selector Data: "checkbox[label='Save and fill addresses']" +Selector Data: "[data-l10n-id='autofill-addresses-checkbox-message']" Description: Label for Autofill > Save and fill addresses option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-payment-methods -Selector Data: "checkbox[label='Save and fill payment methods']" +Selector Data: "[data-l10n-id='autofill-payment-methods-checkbox-message-2']" Description: Label for Autofill > Save and fill payment methods option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json @@ -515,6 +515,20 @@ Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` +Selector Name: saved-payments-button +Selector Data: "[data-l10n-id='autofill-payment-methods-manage-payments-button']" +Description: Embedded button/label for "Manage Saved Payments" +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` +Selector Name: saved-addresses-button +Selector Data: "[data-l10n-id='autofill-addresses-manage-addresses-button']" +Description: Embedded button/label for "Manage Addresses and more..." +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` Selector Name: import-browser-data Selector Data: "button[id='data-migration']" Description: Import Browser Data > Import Data button From 8511f0ce89a1e25509c6d7bd34634702b13c7287 Mon Sep 17 00:00:00 2001 From: Tracy Date: Tue, 14 Oct 2025 12:19:31 -0500 Subject: [PATCH 09/41] Tracy/ Skip new failing tests (#839) --- modules/browser_object_tracker_panel.py | 2 +- .../test_download_pdf_from_context_menu.py | 5 +++++ tests/preferences/test_clear_cookie_data.py | 14 +++++++++---- tests/preferences/test_manage_cookie_data.py | 5 +++++ ..._party_content_blocked_private_browsing.py | 20 +++++++++++-------- 5 files changed, 33 insertions(+), 13 deletions(-) diff --git a/modules/browser_object_tracker_panel.py b/modules/browser_object_tracker_panel.py index a02762d64..839703a16 100644 --- a/modules/browser_object_tracker_panel.py +++ b/modules/browser_object_tracker_panel.py @@ -76,7 +76,7 @@ def wait_for_blocked_tracking_icon( self, nav: Navigation, page: BasePage ) -> BasePage: """ - Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refresing the page + Waits for the shield icon to indicate that cookies/trackers are being blocked by continuously refreshing the page Remember to open the passed in page beforehand, this waits for the page to load. diff --git a/tests/downloads/test_download_pdf_from_context_menu.py b/tests/downloads/test_download_pdf_from_context_menu.py index 49536e66e..eb07a5c42 100644 --- a/tests/downloads/test_download_pdf_from_context_menu.py +++ b/tests/downloads/test_download_pdf_from_context_menu.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -24,6 +25,10 @@ def delete_files_regex_string(): PDF_TELEMETRY_DATA = ["downloads", "added", "fileExtension", "pdf"] +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994061", +) @pytest.mark.headed def test_download_pdf_from_context_menu( driver: Firefox, diff --git a/tests/preferences/test_clear_cookie_data.py b/tests/preferences/test_clear_cookie_data.py index 8ca8120f6..e0ed97862 100644 --- a/tests/preferences/test_clear_cookie_data.py +++ b/tests/preferences/test_clear_cookie_data.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox from selenium.webdriver.support.ui import WebDriverWait @@ -24,7 +26,7 @@ def _dialog_options_present(about_prefs: AboutPrefs) -> bool: return False -def open_clear_cookies_data_dialog( +def _open_clear_cookies_data_dialog( about_prefs: AboutPrefs, ba: BrowserActions, wait: WebDriverWait ): """ @@ -53,6 +55,10 @@ def open_clear_cookies_data_dialog( # @pytest.mark.skipif(WIN_GHA, reason="Test unstable in Windows GA, tracked in 1990570") +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994055", +) def test_clear_cookie_data(driver: Firefox): """ C143627: Cookies and site data can be cleared via the "Clear Data" panel @@ -65,7 +71,7 @@ def test_clear_cookie_data(driver: Firefox): driver.get(WEBSITE_ADDRESS) # Open dialog and read current value (must be > 0) - cookie_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + cookie_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert cookie_value > 0, f"Expected cookie/site data > 0, got {cookie_value}" # Clear cookies and site data: open dialog again, wait for iframe, click clear @@ -77,7 +83,7 @@ def test_clear_cookie_data(driver: Firefox): ba.switch_to_content_context() # Wait until the dialog reports 0 (reopen/poll via helper) - wait.until(lambda _: open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) + wait.until(lambda _: _open_clear_cookies_data_dialog(about_prefs, ba, wait) == 0) - final_value = open_clear_cookies_data_dialog(about_prefs, ba, wait) + final_value = _open_clear_cookies_data_dialog(about_prefs, ba, wait) assert final_value == 0, f"Expected 0 after clearing, got {final_value}" diff --git a/tests/preferences/test_manage_cookie_data.py b/tests/preferences/test_manage_cookie_data.py index 3cf377248..5dbc2cadb 100644 --- a/tests/preferences/test_manage_cookie_data.py +++ b/tests/preferences/test_manage_cookie_data.py @@ -1,3 +1,4 @@ +from platform import system from time import sleep import pytest @@ -16,6 +17,10 @@ def test_case(): COOKIE_SITE = "google.com" +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994056", +) @pytest.mark.headed @pytest.mark.noxvfb def test_manage_cookie_data(driver: Firefox): diff --git a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py index e68161cfb..dfc4bfb93 100644 --- a/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py +++ b/tests/security_and_privacy/test_third_party_content_blocked_private_browsing.py @@ -1,3 +1,5 @@ +from platform import system + import pytest from selenium.webdriver import Firefox @@ -10,14 +12,12 @@ def test_case(): return "446323" -ALLOWED_TRACKING_URLS = set( - [ - "https://content-track-digest256.dummytracker.org", - "https://ads-track-digest256.dummytracker.org", - "https://social-track-digest256.dummytracker.org", - "https://analytics-track-digest256.dummytracker.org", - ] -) +ALLOWED_TRACKING_URLS = { + "https://content-track-digest256.dummytracker.org", + "https://ads-track-digest256.dummytracker.org", + "https://social-track-digest256.dummytracker.org", + "https://analytics-track-digest256.dummytracker.org", +} BLOCKED_TRACKER_URL = "https://content-track-digest256.dummytracker.org" FIRST_TRACKER_WEBSITE = "https://senglehardt.com/test/trackingprotection/test_pages/tracking_protection.html" @@ -103,6 +103,10 @@ def test_third_party_content_blocked_private_browsing_allowed_tracking(driver: F assert item.get_attribute("value") in ALLOWED_TRACKING_URLS +@pytest.mark.skipif( + system().lower().startswith("darwin") or system().lower().startswith("linux"), + reason="bug 1994060", +) def test_third_party_content_private_browsing_tracking_statuses(driver: Firefox): """ C446323.3: Ensure that the statuses of some third party content are loaded properly From 109f57a8e5608ea249f3c42015e66682099aeed2 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:29:38 -0700 Subject: [PATCH 10/41] stabilize autofill tests --- modules/data/about_prefs.components.json | 14 ++++++++++++-- modules/page_object_prefs.py | 22 +++++++--------------- tests/form_autofill/conftest.py | 2 ++ 3 files changed, 21 insertions(+), 17 deletions(-) diff --git a/modules/data/about_prefs.components.json b/modules/data/about_prefs.components.json index 2b2d50092..6c9a8125d 100644 --- a/modules/data/about_prefs.components.json +++ b/modules/data/about_prefs.components.json @@ -45,12 +45,12 @@ "groups": [] }, "save-and-fill-addresses": { - "selectorData": "checkbox[label='Save and fill addresses']", + "selectorData": "[data-l10n-id='autofill-addresses-checkbox-message']", "strategy": "css", "groups": [] }, "save-and-fill-payment-methods": { - "selectorData": "checkbox[label='Save and fill payment methods']", + "selectorData": "[data-l10n-id='autofill-payment-methods-checkbox-message-2']", "strategy": "css", "groups": [] }, @@ -59,6 +59,16 @@ "strategy": "css", "groups": [] }, + "saved-payments-button": { + "selectorData": "[data-l10n-id='autofill-payment-methods-manage-payments-button']", + "strategy": "css", + "groups": [] + }, + "saved-addresses-button": { + "selectorData": "[data-l10n-id='autofill-addresses-manage-addresses-button']", + "strategy": "css", + "groups": [] + }, "import-browser-data": { "selectorData": "button[id='data-migration']", "strategy": "css", diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index 9f0528e16..d84c84850 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -204,12 +204,6 @@ def verify_cc_edit_saved_payments_profile( assert field_value != expected_cvv, "CVV is displayed." return self - def get_saved_payments_popup(self) -> WebElement: - """ - Open saved payments dialog panel - """ - return self.get_element("prefs-button", labels=["Saved payment methods"]) - def click_edit_on_dialog_element(self): """ Click on edit button on dialog panel @@ -283,7 +277,11 @@ def add_entry_to_saved_payments(self, cc_data: CreditCardBase): def close_dialog_box(self): """Close dialog box for saved addresses or payments.""" self.element_clickable("panel-popup-button", labels=["close-button"]) - self.get_element("panel-popup-button", labels=["close-button"]).click() + self.click_on("panel-popup-button", labels=["close-button"]) + if self.get_element( + "panel-popup-button", labels=["close-button"] + ).is_displayed(): + self.click_on("panel-popup-button", labels=["close-button"]) return self def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: @@ -317,12 +315,6 @@ def update_cc_field_panel(self, field_name: str, value: str | int) -> BasePage: self.get_element("save-button").click() return self - def get_saved_addresses_popup(self) -> WebElement: - """ - Returns saved addresses button element - """ - return self.get_element("prefs-button", labels=["Saved addresses"]) - def open_and_switch_to_saved_addresses_popup(self) -> BasePage: """ Open and Switch to saved addresses popup frame. @@ -420,7 +412,7 @@ def get_saved_payments_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_payments_popup().click() + self.click_on("saved-payments-button") iframe = self.get_element("browser-popup") return iframe @@ -444,7 +436,7 @@ def get_saved_addresses_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ - self.get_saved_addresses_popup().click() + self.click_on("saved-addresses-button") iframe = self.get_element("browser-popup") return iframe diff --git a/tests/form_autofill/conftest.py b/tests/form_autofill/conftest.py index f7006beb3..2cdf5d15d 100644 --- a/tests/form_autofill/conftest.py +++ b/tests/form_autofill/conftest.py @@ -19,6 +19,8 @@ def prefs_list(add_to_prefs_list: dict): prefs = [ ("extensions.formautofill.creditCards.reauth.optout", False), ("extensions.formautofill.reauth.enabled", False), + ("extensions.formautofill.addresses.enabled", True), + ("extensions.formautofill.creditCards.enabled", True), ] prefs.extend(add_to_prefs_list) return prefs From 42d21527be41f4608f879c00e42380a1064bbd50 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Mon, 13 Oct 2025 15:38:22 -0700 Subject: [PATCH 11/41] add selectors --- SELECTOR_INFO.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 54fea6f27..84b63802f 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -495,14 +495,14 @@ Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-addresses -Selector Data: "checkbox[label='Save and fill addresses']" +Selector Data: "[data-l10n-id='autofill-addresses-checkbox-message']" Description: Label for Autofill > Save and fill addresses option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: save-and-fill-payment-methods -Selector Data: "checkbox[label='Save and fill payment methods']" +Selector Data: "[data-l10n-id='autofill-payment-methods-checkbox-message-2']" Description: Label for Autofill > Save and fill payment methods option Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json @@ -515,6 +515,20 @@ Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json ``` ``` +Selector Name: saved-payments-button +Selector Data: "[data-l10n-id='autofill-payment-methods-manage-payments-button']" +Description: Embedded button/label for "Manage Saved Payments" +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` +Selector Name: saved-addresses-button +Selector Data: "[data-l10n-id='autofill-addresses-manage-addresses-button']" +Description: Embedded button/label for "Manage Addresses and more..." +Location: about:preferences#privacy +Path to .json: modules/data/about_prefs.components.json +``` +``` Selector Name: import-browser-data Selector Data: "button[id='data-migration']" Description: Import Browser Data > Import Data button From 706954a43efa2b98fb6cd94c344ad7fc5237e79d Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 11:42:23 -0700 Subject: [PATCH 12/41] modify one selector --- SELECTOR_INFO.md | 2 +- modules/data/about_prefs.components.json | 2 +- .../test_search_mode_persists_mixed_with_bing.py | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 84b63802f..3cd6142ec 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -859,7 +859,7 @@ Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: cookies-privacy-label -Selector Data: "description[data-l10n-id='sitedata-delete-on-close-private-browsing2']" +Selector Data: "description[data-l10n-id='sitedata-delete-on-close-private-browsing3']" Description: Message in Cookies and Site data when History is not remembered Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json diff --git a/modules/data/about_prefs.components.json b/modules/data/about_prefs.components.json index 6c9a8125d..2570ade61 100644 --- a/modules/data/about_prefs.components.json +++ b/modules/data/about_prefs.components.json @@ -317,7 +317,7 @@ "groups": [] }, "cookies-privacy-label": { - "selectorData": "description[data-l10n-id='sitedata-delete-on-close-private-browsing2']", + "selectorData": "description[data-l10n-id='sitedata-delete-on-close-private-browsing3']", "strategy": "css", "groups": [] }, diff --git a/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py index 9b98a46d2..7d7cbc5d0 100644 --- a/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py +++ b/tests/address_bar_and_search/test_search_mode_persists_mixed_with_bing.py @@ -5,10 +5,12 @@ from modules.browser_object_navigation import Navigation from modules.page_object_generics import GenericPage + @pytest.fixture() def test_case(): return "3028730" + @pytest.mark.parametrize("engine", ["DuckDuckGo"]) def test_search_mode_persists_mixed_with_bing(driver: Firefox, engine): """ From 6a3fc08430b609740924a8855d6d9df15ed4d571 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 11:58:56 -0700 Subject: [PATCH 13/41] check running version is actually correct --- tests/meta/test_version.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/meta/test_version.py b/tests/meta/test_version.py index 991f345f6..6f97d7518 100644 --- a/tests/meta/test_version.py +++ b/tests/meta/test_version.py @@ -2,10 +2,11 @@ from subprocess import check_output -def test_version(opt_ci, fx_executable): +def test_version(driver, opt_ci, fx_executable): """Get the Fx version""" version = check_output([fx_executable, "--version"]).decode() + assert driver.capabilities["browserVersion"] in version logging.info(version) if opt_ci: with open("artifacts/fx_version", "w") as fh: From e963d91b36c27c6915d0b508abc5f4ea2721434b Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 13:32:58 -0700 Subject: [PATCH 14/41] attempt to force CI machine to see payment/address buttons in prefs --- SELECTOR_INFO.md | 2 +- modules/data/about_prefs.components.json | 2 +- modules/page_object_prefs.py | 2 ++ .../test_never_remember_browsing_history.py | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/SELECTOR_INFO.md b/SELECTOR_INFO.md index 3cd6142ec..cf512adeb 100644 --- a/SELECTOR_INFO.md +++ b/SELECTOR_INFO.md @@ -859,7 +859,7 @@ Path to .json: modules/data/about_prefs.components.json ``` ``` Selector Name: cookies-privacy-label -Selector Data: "description[data-l10n-id='sitedata-delete-on-close-private-browsing3']" +Selector Data: "[data-l10n-id='sitedata-delete-on-close-private-browsing3']" Description: Message in Cookies and Site data when History is not remembered Location: about:preferences#privacy Path to .json: modules/data/about_prefs.components.json diff --git a/modules/data/about_prefs.components.json b/modules/data/about_prefs.components.json index 2570ade61..c1e5e3a9f 100644 --- a/modules/data/about_prefs.components.json +++ b/modules/data/about_prefs.components.json @@ -317,7 +317,7 @@ "groups": [] }, "cookies-privacy-label": { - "selectorData": "description[data-l10n-id='sitedata-delete-on-close-private-browsing3']", + "selectorData": "[data-l10n-id='sitedata-delete-on-close-private-browsing3']", "strategy": "css", "groups": [] }, diff --git a/modules/page_object_prefs.py b/modules/page_object_prefs.py index d84c84850..a04fbcb76 100644 --- a/modules/page_object_prefs.py +++ b/modules/page_object_prefs.py @@ -412,6 +412,7 @@ def get_saved_payments_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ + self.find_in_settings("pay") self.click_on("saved-payments-button") iframe = self.get_element("browser-popup") return iframe @@ -436,6 +437,7 @@ def get_saved_addresses_popup_iframe(self) -> WebElement: """ Returns the iframe object for the dialog panel in the popup """ + self.find_in_settings("pay") self.click_on("saved-addresses-button") iframe = self.get_element("browser-popup") return iframe diff --git a/tests/security_and_privacy/test_never_remember_browsing_history.py b/tests/security_and_privacy/test_never_remember_browsing_history.py index 89708e266..e23e251fc 100644 --- a/tests/security_and_privacy/test_never_remember_browsing_history.py +++ b/tests/security_and_privacy/test_never_remember_browsing_history.py @@ -38,7 +38,7 @@ def test_never_remember_browsing_history_settings(driver: Firefox): # perform all about:preferences#privacy assertions according to testrail cookies_label = about_prefs.get_element("cookies-privacy-label") - assert cookies_label.get_attribute("innerHTML") == COOKIE_LABEL_TEXT + assert cookies_label.get_attribute("message") == COOKIE_LABEL_TEXT delete_cookies_checkbox = about_prefs.get_element("cookies-delete-on-close") assert delete_cookies_checkbox.get_attribute("checked") == "true" From c0f49db2a9171de2a7688a672222c1042daef952 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 15:49:11 -0700 Subject: [PATCH 15/41] get loc of installed win fx --- .github/workflows/smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 861e79208..0a35d5082 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -105,6 +105,7 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" + echo $env:FX_EXECUTABLE Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest $(cat selected_tests) From cc05964b865a251b8108db2920099ca654952876 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 16:26:54 -0700 Subject: [PATCH 16/41] just test the version for now --- .github/workflows/smoke.yml | 2 +- tests/meta/test_version.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 0a35d5082..aaffbee69 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -108,7 +108,7 @@ jobs: echo $env:FX_EXECUTABLE Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest $(cat selected_tests) + pipenv run pytest tests/meta/test_version.py $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE diff --git a/tests/meta/test_version.py b/tests/meta/test_version.py index 6f97d7518..6490755fe 100644 --- a/tests/meta/test_version.py +++ b/tests/meta/test_version.py @@ -1,3 +1,4 @@ +import json import logging from subprocess import check_output @@ -8,6 +9,10 @@ def test_version(driver, opt_ci, fx_executable): version = check_output([fx_executable, "--version"]).decode() assert driver.capabilities["browserVersion"] in version logging.info(version) + driver.get("chrome://browser/content/aboutDialog.xhtml") + ver_label = driver.find_element("id", "version") + ver_info = json.loads(ver_label.get_attribute("data-l10n-args")) + assert ver_info.get("version") in version if opt_ci: with open("artifacts/fx_version", "w") as fh: fh.write(version) From 3bf9fc8934736bd8ca98102515e934b51abbf1cc Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 16:33:24 -0700 Subject: [PATCH 17/41] test quotes for exec --- conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index 142f33e83..c872b685f 100644 --- a/conftest.py +++ b/conftest.py @@ -246,7 +246,7 @@ def fx_executable(request, sys_platform): elif version == "Nightly": location = "C:\\Program Files\\Firefox Nightly\\firefox.exe" elif version == "Custom": - location = "C:\\Program Files\\Custom Firefox\\firefox.exe" + location = '"C:\\Program Files\\Custom Firefox\\firefox.exe"' elif sys_platform == "Darwin": if version == "Firefox": location = "/Applications/Firefox.app/Contents/MacOS/firefox" From ea9c0bebb4c9fb2e80a359f46c5c78043a42638e Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 16:44:57 -0700 Subject: [PATCH 18/41] test quotes for exec --- conftest.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index c872b685f..9720a335b 100644 --- a/conftest.py +++ b/conftest.py @@ -221,7 +221,7 @@ def downloads_folder(sys_platform): """Return the downloads folder location for this OS""" if sys_platform == "Windows": user = os.environ.get("USERNAME") - return f"C:\\Users\\{user}\\Downloads" + return rf"C:\Users\{user}\Downloads" elif sys_platform == "Darwin": # MacOS user = os.environ.get("USER") return f"/Users/{user}/Downloads" @@ -242,11 +242,11 @@ def fx_executable(request, sys_platform): location = "" if sys_platform == "Windows": if version == "Firefox": - location = "C:\\Program Files\\Mozilla Firefox\\firefox.exe" + location = r"C:\Program Files\Mozilla Firefox\firefox.exe" elif version == "Nightly": - location = "C:\\Program Files\\Firefox Nightly\\firefox.exe" + location = r"C:\Program Files\Firefox Nightly\firefox.exe" elif version == "Custom": - location = '"C:\\Program Files\\Custom Firefox\\firefox.exe"' + location = r"C:\Program Files\Custom Firefox\firefox.exe" elif sys_platform == "Darwin": if version == "Firefox": location = "/Applications/Firefox.app/Contents/MacOS/firefox" @@ -450,6 +450,7 @@ def driver( options.add_argument("--remote-allow-system-access") if opt_headless: options.add_argument("--headless") + logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable if use_profile: profile_path = tmp_path / use_profile From 249b4cc02e2b9d0937d4ff1a673dea7d99362a99 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 17:02:06 -0700 Subject: [PATCH 19/41] test win path again --- .github/workflows/smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index aaffbee69..9458f9bd2 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -106,6 +106,7 @@ jobs: pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" echo $env:FX_EXECUTABLE + where firefox Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py From b396cd099d282f1ea5709407625511d635c393a2 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 17:10:21 -0700 Subject: [PATCH 20/41] test win path again --- .github/workflows/smoke.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 9458f9bd2..989f402e3 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -105,11 +105,12 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - echo $env:FX_EXECUTABLE - where firefox + $env:MOZ_LOG = "timestamp,command:5" + $env:MOZ_LOG_FILE = "gecko.log" Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py + pipenv run pytest tests/meta/test_version.py --reruns 1 + cat gecko.log $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From d1df82758a26e45162b389e164d44814890d583f Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 19:25:08 -0700 Subject: [PATCH 21/41] test win path again --- .github/workflows/smoke.yml | 3 --- conftest.py | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 989f402e3..546829bf7 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -105,12 +105,9 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - $env:MOZ_LOG = "timestamp,command:5" - $env:MOZ_LOG_FILE = "gecko.log" Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 - cat gecko.log $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE diff --git a/conftest.py b/conftest.py index 9720a335b..a4ce2070c 100644 --- a/conftest.py +++ b/conftest.py @@ -14,6 +14,7 @@ from selenium.webdriver import Firefox from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options +from selenium.webdriver.firefox.service import Service from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait @@ -450,6 +451,7 @@ def driver( options.add_argument("--remote-allow-system-access") if opt_headless: options.add_argument("--headless") + service = Service(log_path="geckodriver_debug.log") logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable if use_profile: @@ -458,7 +460,7 @@ def driver( options.profile = profile_path for opt, value in prefs_list: options.set_preference(opt, value) - driver = Firefox(options=options) + driver = Firefox(service=service, options=options) separator = "x" if separator not in opt_window_size: if "by" in opt_window_size: From b25316a7d209b5ce110737f8724c8c16b8ef8645 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 19:39:00 -0700 Subject: [PATCH 22/41] test win path again --- .github/workflows/smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 546829bf7..fee0222d7 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -105,6 +105,7 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" + echo $env:FIREFOX_BINARY Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 From 35e18b497aa09b70ce5e2afd724bc99e16c5722e Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 19:46:44 -0700 Subject: [PATCH 23/41] test win path again --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index fee0222d7..b0804bcd1 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -105,7 +105,7 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - echo $env:FIREFOX_BINARY + Get-Acl $env:FX_EXECUTABLE Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 From c625f429366ef7c523b30aa80d3190b51b4d6f65 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Tue, 14 Oct 2025 19:51:39 -0700 Subject: [PATCH 24/41] test win path again --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index b0804bcd1..c5d436ad6 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -99,13 +99,13 @@ jobs: id: setup run: | Start-Process -FilePath "${{ github.workspace }}\setup.exe" -ArgumentList "/S", '/D=C:\Program Files\Custom Firefox' -Wait -NoNewWindow -PassThru + Get-Acl 'C:\Program Files\Custom Firefox\firefox.exe' shell: pwsh - name: Run Smoke Tests in Win if: steps.setup.conclusion == 'success' run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - Get-Acl $env:FX_EXECUTABLE Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 From e816258b483d28494aa861d166acd0f7364b8705 Mon Sep 17 00:00:00 2001 From: Philimon Derib Ayalew Date: Wed, 15 Oct 2025 12:40:39 +0200 Subject: [PATCH 25/41] add log to see binary location --- conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/conftest.py b/conftest.py index a4ce2070c..c533a015b 100644 --- a/conftest.py +++ b/conftest.py @@ -454,6 +454,7 @@ def driver( service = Service(log_path="geckodriver_debug.log") logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable + logging.warning(f"binary loc: {options.binary_location}") if use_profile: profile_path = tmp_path / use_profile unpack_archive(os.path.join("profiles", f"{use_profile}.zip"), profile_path) From 1910d3fc5e12abe37ba0410516ed4c4ef374b60f Mon Sep 17 00:00:00 2001 From: Philimon Derib Ayalew Date: Wed, 15 Oct 2025 13:35:18 +0200 Subject: [PATCH 26/41] see full capabilities object --- conftest.py | 1 - tests/meta/test_version.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/conftest.py b/conftest.py index c533a015b..a4ce2070c 100644 --- a/conftest.py +++ b/conftest.py @@ -454,7 +454,6 @@ def driver( service = Service(log_path="geckodriver_debug.log") logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable - logging.warning(f"binary loc: {options.binary_location}") if use_profile: profile_path = tmp_path / use_profile unpack_archive(os.path.join("profiles", f"{use_profile}.zip"), profile_path) diff --git a/tests/meta/test_version.py b/tests/meta/test_version.py index 6490755fe..70d21d310 100644 --- a/tests/meta/test_version.py +++ b/tests/meta/test_version.py @@ -9,6 +9,7 @@ def test_version(driver, opt_ci, fx_executable): version = check_output([fx_executable, "--version"]).decode() assert driver.capabilities["browserVersion"] in version logging.info(version) + logging.warning(f"Fx version {driver.capabilities}") driver.get("chrome://browser/content/aboutDialog.xhtml") ver_label = driver.find_element("id", "version") ver_info = json.loads(ver_label.get_attribute("data-l10n-args")) From af1312b0fe5e801027364dfe57483b33faa2c0d5 Mon Sep 17 00:00:00 2001 From: Philimon Derib Ayalew Date: Wed, 15 Oct 2025 13:48:43 +0200 Subject: [PATCH 27/41] see full capabilities object --- .github/workflows/smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index c5d436ad6..a7851f733 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -121,6 +121,7 @@ jobs: mv ./ci_pyproject_headed.toml ./pyproject.toml; $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" pipenv run python choose_ci_set.py + pipenv run pytest tests/meta/test_version.py --reruns 1 pipenv run pytest $(cat selected_tests) $env:TEST_EXIT_CODE = $LASTEXITCODE rm artifacts/assets -r -Force From 4e3a0322a9e12669f626c16037f01aa5d7b0b8df Mon Sep 17 00:00:00 2001 From: Philimon Derib Ayalew Date: Wed, 15 Oct 2025 14:10:36 +0200 Subject: [PATCH 28/41] remove lines --- .github/workflows/smoke.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index a7851f733..c5d436ad6 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -121,7 +121,6 @@ jobs: mv ./ci_pyproject_headed.toml ./pyproject.toml; $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --reruns 1 pipenv run pytest $(cat selected_tests) $env:TEST_EXIT_CODE = $LASTEXITCODE rm artifacts/assets -r -Force From 6406efb5ebfaa20c9a3bb48bc24306e89883b0eb Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 07:47:20 -0700 Subject: [PATCH 29/41] test win path again, sleep --- .github/workflows/smoke.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index c5d436ad6..764713324 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -106,6 +106,7 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" + Start-Sleep -Seconds 5 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 From ae96758704f8afb7703f7ab199e69d0fe3ed5234 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 07:58:04 -0700 Subject: [PATCH 30/41] test win path again, sleep --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 764713324..447b4e43e 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -106,7 +106,7 @@ jobs: run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py pipenv run pytest tests/meta/test_version.py --reruns 1 From 00b8d7463b4387fcbb7c1c215de6e974316932fb Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:02:09 -0700 Subject: [PATCH 31/41] test win path again --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 447b4e43e..1a3f83508 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -109,7 +109,7 @@ jobs: Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --reruns 1 + pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "$FX_EXECUTABLE" $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From fd3d44dc5b6351e7833f578beff00691be34a829 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:06:19 -0700 Subject: [PATCH 32/41] test win path again --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 1a3f83508..ad0c8c1c2 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -109,7 +109,7 @@ jobs: Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "$FX_EXECUTABLE" + pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "env:$FX_EXECUTABLE" $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From 6cff6ea97ef3058be2bd8d1fa60c99c24a539390 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:07:38 -0700 Subject: [PATCH 33/41] test win path again --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index ad0c8c1c2..ceaf8fe5a 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -109,7 +109,7 @@ jobs: Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "env:$FX_EXECUTABLE" + pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "$env:FX_EXECUTABLE" $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From b2cf173564403323c05d08e528737622b612bec6 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:14:45 -0700 Subject: [PATCH 34/41] try to force a write of fx location --- conftest.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index a4ce2070c..3b3be65d0 100644 --- a/conftest.py +++ b/conftest.py @@ -1,4 +1,5 @@ import datetime +import json import logging import os import platform @@ -14,7 +15,6 @@ from selenium.webdriver import Firefox from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options -from selenium.webdriver.firefox.service import Service from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait @@ -451,7 +451,6 @@ def driver( options.add_argument("--remote-allow-system-access") if opt_headless: options.add_argument("--headless") - service = Service(log_path="geckodriver_debug.log") logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable if use_profile: @@ -460,7 +459,11 @@ def driver( options.profile = profile_path for opt, value in prefs_list: options.set_preference(opt, value) - driver = Firefox(service=service, options=options) + driver = Firefox(options=options) + resp = driver.command_executor._request( + "GET", f"{driver.command_executor._url}/session/{driver.session_id}" + ) + logging.warning(json.dumps(resp, indent=2)) separator = "x" if separator not in opt_window_size: if "by" in opt_window_size: From 94050feb282334caa6962f93db6dfa42d7ec2ea2 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:18:22 -0700 Subject: [PATCH 35/41] try to force a write of fx location --- conftest.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/conftest.py b/conftest.py index 3b3be65d0..fa81be634 100644 --- a/conftest.py +++ b/conftest.py @@ -1,5 +1,4 @@ import datetime -import json import logging import os import platform @@ -9,6 +8,7 @@ from subprocess import check_output, run from typing import Callable, List, Tuple, Union +import psutil import pytest from PIL import Image, ImageGrab from selenium.common.exceptions import TimeoutException, WebDriverException @@ -460,10 +460,9 @@ def driver( for opt, value in prefs_list: options.set_preference(opt, value) driver = Firefox(options=options) - resp = driver.command_executor._request( - "GET", f"{driver.command_executor._url}/session/{driver.session_id}" - ) - logging.warning(json.dumps(resp, indent=2)) + for proc in psutil.process_iter(["name", "exe", "cmdline"]): + if proc.info["name"] and "firefox" in proc.info["name"].lower(): + print(proc.info) separator = "x" if separator not in opt_window_size: if "by" in opt_window_size: From 182c7e59ea3dfe26efd235679b95feb565febcd3 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:27:28 -0700 Subject: [PATCH 36/41] attempt to disable Se driver mgmt --- .github/workflows/smoke.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index ceaf8fe5a..a650d3f52 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -109,7 +109,8 @@ jobs: Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --reruns 1 --fx-executable "$env:FX_EXECUTABLE" + $env:SE_DISABLE_DRIVER_MANAGEMENT = "true" + pipenv run pytest tests/meta/test_version.py --reruns 1" $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From 0b4c5c52c36f5fcf3fc596d5df3e485d4d334761 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 08:48:38 -0700 Subject: [PATCH 37/41] attempt to disable Se driver mgmt --- .github/workflows/smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index a650d3f52..064be1e64 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -110,7 +110,7 @@ jobs: Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py $env:SE_DISABLE_DRIVER_MANAGEMENT = "true" - pipenv run pytest tests/meta/test_version.py --reruns 1" + pipenv run pytest tests/meta/test_version.py --reruns 1 $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE From d37dc4b914d21f97f50d0f2c357f7b5bda67a3f1 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 09:07:59 -0700 Subject: [PATCH 38/41] attempt to disable Se driver mgmt --- .github/workflows/smoke.yml | 3 +-- conftest.py | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 064be1e64..9a70a4f11 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -109,8 +109,7 @@ jobs: Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - $env:SE_DISABLE_DRIVER_MANAGEMENT = "true" - pipenv run pytest tests/meta/test_version.py --reruns 1 + pipenv run pytest tests/meta/test_version.py --geckodriver geckodriver.exe --reruns 1 $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE diff --git a/conftest.py b/conftest.py index fa81be634..cbaabc86f 100644 --- a/conftest.py +++ b/conftest.py @@ -15,6 +15,7 @@ from selenium.webdriver import Firefox from selenium.webdriver.common.by import By from selenium.webdriver.firefox.options import Options +from selenium.webdriver.firefox.service import Service from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait @@ -133,6 +134,13 @@ def pytest_addoption(parser): help="Path to Fx executable. Will overwrite --fx-channel.", ) + parser.addoption( + "--geckodriver", + action="store", + default="", + help="Path to geckodriver.", + ) + parser.addoption( "--run-headless", action="store_true", @@ -217,6 +225,11 @@ def sys_platform(): return platform.system() +@pytest.fixture(scope="session") +def geckodriver(request): + return request.config.getoption("--geckodriver") + + @pytest.fixture() def downloads_folder(sys_platform): """Return the downloads folder location for this OS""" @@ -393,6 +406,7 @@ def hard_quit(): @pytest.fixture(autouse=True) def driver( fx_executable: str, + geckodriver: str, opt_headless: bool, opt_implicit_timeout: int, prefs_list: List[Tuple], @@ -459,7 +473,11 @@ def driver( options.profile = profile_path for opt, value in prefs_list: options.set_preference(opt, value) - driver = Firefox(options=options) + if geckodriver: + service = Service(executable_path=geckodriver) + driver = Firefox(service=service, options=options) + else: + driver = Firefox(options=options) for proc in psutil.process_iter(["name", "exe", "cmdline"]): if proc.info["name"] and "firefox" in proc.info["name"].lower(): print(proc.info) From a499274846f9d9bec54859344a6de00527257efb Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 09:19:38 -0700 Subject: [PATCH 39/41] attempt to run again --- .github/workflows/smoke.yml | 4 +--- conftest.py | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index 9a70a4f11..e0806679b 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -99,17 +99,15 @@ jobs: id: setup run: | Start-Process -FilePath "${{ github.workspace }}\setup.exe" -ArgumentList "/S", '/D=C:\Program Files\Custom Firefox' -Wait -NoNewWindow -PassThru - Get-Acl 'C:\Program Files\Custom Firefox\firefox.exe' shell: pwsh - name: Run Smoke Tests in Win if: steps.setup.conclusion == 'success' run: | pipenv run python -c "import sys; print(sys.platform)" $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" - Start-Sleep -Seconds 6 Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --geckodriver geckodriver.exe --reruns 1 + pipenv run pytest tests/meta/test_version.py --geckodriver geckodriver.exe $(cat selected_tests) $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE diff --git a/conftest.py b/conftest.py index cbaabc86f..8343476d7 100644 --- a/conftest.py +++ b/conftest.py @@ -465,7 +465,6 @@ def driver( options.add_argument("--remote-allow-system-access") if opt_headless: options.add_argument("--headless") - logging.warning(f"FX loc: {fx_executable}") options.binary_location = fx_executable if use_profile: profile_path = tmp_path / use_profile From ffed07e2f7dd353a7e577e041b7eeb358edb130f Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 09:21:07 -0700 Subject: [PATCH 40/41] remove debug --- conftest.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/conftest.py b/conftest.py index 8343476d7..18b45e369 100644 --- a/conftest.py +++ b/conftest.py @@ -8,7 +8,7 @@ from subprocess import check_output, run from typing import Callable, List, Tuple, Union -import psutil +# import psutil import pytest from PIL import Image, ImageGrab from selenium.common.exceptions import TimeoutException, WebDriverException @@ -477,9 +477,10 @@ def driver( driver = Firefox(service=service, options=options) else: driver = Firefox(options=options) - for proc in psutil.process_iter(["name", "exe", "cmdline"]): - if proc.info["name"] and "firefox" in proc.info["name"].lower(): - print(proc.info) + # Uncomment below to find Fx process info + # for proc in psutil.process_iter(["name", "exe", "cmdline"]): + # if proc.info["name"] and "firefox" in proc.info["name"].lower(): + # print(proc.info) separator = "x" if separator not in opt_window_size: if "by" in opt_window_size: From 5b1a1027419a2dddbbb3e20b606fe00895605f70 Mon Sep 17 00:00:00 2001 From: Ben Chatterton Date: Wed, 15 Oct 2025 09:26:06 -0700 Subject: [PATCH 41/41] remove debug --- .github/workflows/smoke.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/smoke.yml b/.github/workflows/smoke.yml index e0806679b..7a3d15bb3 100644 --- a/.github/workflows/smoke.yml +++ b/.github/workflows/smoke.yml @@ -107,7 +107,7 @@ jobs: $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" Start-Process -FilePath $env:FX_EXECUTABLE -ArgumentList "--version" -Wait -NoNewWindow pipenv run python choose_ci_set.py - pipenv run pytest tests/meta/test_version.py --geckodriver geckodriver.exe $(cat selected_tests) + pipenv run pytest --geckodriver geckodriver.exe $(cat selected_tests) $env:TEST_EXIT_CODE = $LASTEXITCODE mv artifacts artifacts-win || true exit $env:TEST_EXIT_CODE @@ -120,7 +120,7 @@ jobs: mv ./ci_pyproject_headed.toml ./pyproject.toml; $env:FX_EXECUTABLE = "C:\Program Files\Custom Firefox\firefox.exe" pipenv run python choose_ci_set.py - pipenv run pytest $(cat selected_tests) + pipenv run pytest --geckodriver geckodriver.exe $(cat selected_tests) $env:TEST_EXIT_CODE = $LASTEXITCODE rm artifacts/assets -r -Force Get-ChildItem -Path "artifacts" | ForEach-Object {