@@ -38,7 +38,9 @@ def test_play_mute_unmute_tabs_via_toggle(driver: Firefox, sys_platform: str):
3838 context_menu = ContextMenu (driver )
3939 mouse = Controller ()
4040 wait = WebDriverWait (driver , 10 )
41-
41+ DELAY = 2
42+ POSITION_DELAY = 0.3
43+
4244 # Open Mozilla's Youtube Page
4345 playlist_url = "https://www.youtube.com/@Mozilla/videos"
4446 playlist_page = GenericPage (driver , url = playlist_url )
@@ -56,7 +58,7 @@ def test_play_mute_unmute_tabs_via_toggle(driver: Firefox, sys_platform: str):
5658
5759 # Verify correct number of tabs opened
5860 tabs .wait_for_num_tabs (3 )
59- sleep (2 )
61+ sleep (DELAY )
6062
6163 # Select all tabs via Control/Command click while staying on first tab
6264 modifier_key = Keys .COMMAND if sys_platform == "Darwin" else Keys .CONTROL
@@ -102,9 +104,9 @@ def click_multi_tab_audio_button():
102104 )
103105 # Offset to click on the audio control area (left side of tab)
104106 mouse .position = (element_x - 75 , element_y )
105- sleep (0.3 ) # Small delay for mouse positioning
107+ sleep (POSITION_DELAY ) # Small delay for mouse positioning
106108 mouse .click (Button .left , 1 )
107- sleep (2 ) # Wait for action to take effect
109+ sleep (DELAY ) # Wait for action to take effect
108110
109111 # Click Play button
110112 click_multi_tab_audio_button ()
0 commit comments