File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ import pytest
2
+ from selenium .webdriver import Firefox
3
+
4
+ from modules .browser_object import ContextMenu , TabBar
5
+ from modules .page_object import ExamplePage
6
+
7
+
8
+ @pytest .fixture ()
9
+ def test_case ():
10
+ return "134726"
11
+
12
+
13
+ @pytest .mark .headed
14
+ def test_close_pinned_tab_via_middle_click (driver : Firefox ):
15
+ """
16
+ C134726 - Verify middle-clicking pinned tab will close it
17
+ """
18
+
19
+ example = ExamplePage (driver ).open ()
20
+ tabs = TabBar (driver )
21
+ tab_menu = ContextMenu (driver )
22
+
23
+ # Open 2 new tabs
24
+ for _ in range (2 ):
25
+ tabs .new_tab_by_button ()
26
+ tabs .wait_for_num_tabs (3 )
27
+
28
+ # Pin the first tab
29
+ with driver .context (driver .CONTEXT_CHROME ):
30
+ first_tab = tabs .get_tab (1 )
31
+ tabs .context_click (first_tab )
32
+ tab_menu .click_and_hide_menu ("context-menu-pin-tab" )
33
+ assert tabs .is_pinned (first_tab ), "Expected the first tab to be pinned"
34
+
35
+ # Middle-click the pinned tab to close it
36
+ tabs .middle_click (first_tab )
37
+
38
+ # Verify pinned tab was closed and 2 tabs remain
39
+ tabs .wait_for_num_tabs (2 )
You can’t perform that action at this time.
0 commit comments