Skip to content

Commit d55cd47

Browse files
committed
Add test to verify customize firefox tab displays
1 parent 0777f74 commit d55cd47

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import pytest
2+
from selenium.webdriver import Firefox
3+
from selenium.webdriver.common.by import By
4+
5+
from modules.browser_object_panel_ui import PanelUi
6+
from modules.browser_object_tabbar import TabBar
7+
from modules.page_object import ExamplePage
8+
9+
10+
@pytest.fixture()
11+
def test_case():
12+
return "134463"
13+
14+
15+
def test_customize_button_displayed_in_tab_bar(driver: Firefox):
16+
"""
17+
C134463 - Verify that the Customize button is displayed in the tab bar
18+
and the Customize tab persists when switching tabs.
19+
"""
20+
21+
panel_ui = PanelUi(driver)
22+
tabs = TabBar(driver)
23+
24+
# Open an initial example page
25+
example = ExamplePage(driver)
26+
example.open()
27+
28+
# Open customize firefox toolbar tab
29+
panel_ui.open_panel_menu()
30+
panel_ui.navigate_to_customize_toolbar()
31+
32+
tabs.click_tab_by_index(1)
33+
34+
# Verify that the customize firefox tab is open in background
35+
with driver.context(driver.CONTEXT_CHROME):
36+
customize_tab = tabs.get_tab(2)
37+
assert customize_tab is not None, "Customize tab should still exist."
38+
assert tabs.get_tab_title(customize_tab) == "Customize Firefox"
39+
assert customize_tab.get_attribute("visuallyselected") != "true", (
40+
"Customize tab should be unfocused."
41+
)
42+
43+
# Verify that the customize firefox tab is opened and correct
44+
example.switch_to_new_tab()
45+
with driver.context(driver.CONTEXT_CHROME):
46+
element = driver.find_element(By.ID, "customization-container")
47+
assert element, "element not found"

0 commit comments

Comments
 (0)