@@ -250,29 +250,18 @@ def set_always_open_similar_files(self) -> BasePage:
250250 """
251251 From the downloads panel, right-click the most recent download and set 'Always Open Similar Files'.
252252 """
253- print ("\n [DEBUG] Starting set_always_open_similar_files" )
254-
255253 downloads_button = self .get_download_button ()
256- print ("[DEBUG] Got downloads button" )
257254 downloads_button .click ()
258- print ("[DEBUG] Clicked downloads button" )
259255
256+ # Locate the latest downloaded file in the panel, open context menu and choose 'Always Open Similar Files'
260257 download_item = self .get_element ("download-panel-item" )
261- print (
262- f"[DEBUG] Got download item: { download_item .get_attribute ('outerHTML' )[:200 ]} "
263- )
264-
265258 self .context_click (download_item )
266- print ("[DEBUG] Context clicked download item" )
267-
268259 self .context_menu .get_element ("context-menu-always-open-similar-files" ).click ()
269- print ("[DEBUG] Clicked 'Always Open Similar Files'" )
270-
271260 return self
272261
273262 @BasePage .context_chrome
274263 def wait_for_download_animation_finish (
275- self , downloads_button : WebElement
264+ self , downloads_button : WebElement
276265 ) -> BasePage :
277266 """
278267 Waits for the download button to finish playing the animation for downloading to local computer
@@ -346,7 +335,7 @@ def hard_reload_with_key_combo(self) -> BasePage:
346335 return self
347336
348337 def handle_geolocation_prompt (
349- self , button_type = "primary" , remember_this_decision = False
338+ self , button_type = "primary" , remember_this_decision = False
350339 ):
351340 """
352341 Handles geolocation prompt by clicking either the 'Allow' or 'Block' button based on the button_type provided
@@ -413,7 +402,7 @@ def bookmark_page_in_other_bookmarks(self) -> BasePage:
413402
414403 @BasePage .context_chrome
415404 def add_bookmark_via_toolbar_other_bookmark_context_menu (
416- self , bookmark_data : Bookmark , ba : BrowserActions
405+ self , bookmark_data : Bookmark , ba : BrowserActions
417406 ) -> BasePage :
418407 """
419408 Add a bookmark via the toolbar's Other Bookmarks context menu.
@@ -485,7 +474,7 @@ def open_add_bookmark_via_toolbar_other_bookmarks_context_menu(self) -> BasePage
485474
486475 @BasePage .context_chrome
487476 def delete_bookmark_from_other_bookmarks_via_context_menu (
488- self , bookmark_name : str
477+ self , bookmark_name : str
489478 ) -> BasePage :
490479 """
491480 Deletes a bookmark from Other Bookmarks via context menu.
@@ -512,7 +501,7 @@ def delete_bookmark_from_bookmarks_toolbar(self, bookmark_name: str) -> BasePage
512501
513502 @BasePage .context_chrome
514503 def verify_bookmark_exists_in_toolbar_other_bookmarks_folder (
515- self , bookmark_name : str
504+ self , bookmark_name : str
516505 ) -> BasePage :
517506 """
518507 Verify bookmark exists in Other Bookmarks folder from toolbar
@@ -528,7 +517,7 @@ def verify_bookmark_exists_in_toolbar_other_bookmarks_folder(
528517
529518 @BasePage .context_chrome
530519 def verify_bookmark_exists_in_bookmarks_toolbar (
531- self , bookmark_name : str
520+ self , bookmark_name : str
532521 ) -> BasePage :
533522 """
534523 Verify bookmark exists in the bookmarks toolbar
@@ -538,7 +527,7 @@ def verify_bookmark_exists_in_bookmarks_toolbar(
538527
539528 @BasePage .context_chrome
540529 def verify_bookmark_does_not_exist_in_toolbar_other_bookmarks_folder (
541- self , bookmark_name : str
530+ self , bookmark_name : str
542531 ) -> BasePage :
543532 """
544533 Verify bookmark does not exist in Other Bookmarks folder from toolbar
@@ -554,7 +543,7 @@ def verify_bookmark_does_not_exist_in_toolbar_other_bookmarks_folder(
554543
555544 @BasePage .context_chrome
556545 def verify_bookmark_does_not_exist_in_bookmarks_toolbar (
557- self , bookmark_name : str
546+ self , bookmark_name : str
558547 ) -> BasePage :
559548 """Verify bookmark does not exist in the bookmarks toolbar"""
560549 self .panel_ui .element_not_visible ("bookmark-by-title" , labels = [bookmark_name ])
@@ -615,7 +604,7 @@ def open_bookmark_from_toolbar(self, bookmark_title: str) -> BasePage:
615604
616605 @BasePage .context_chrome
617606 def open_bookmark_in_new_tab_via_context_menu (
618- self , bookmark_title : str
607+ self , bookmark_title : str
619608 ) -> BasePage :
620609 """
621610 Right-click bookmark and opens it in a new tab via context menu
@@ -632,7 +621,7 @@ def open_bookmark_in_new_tab_via_context_menu(
632621
633622 @BasePage .context_chrome
634623 def open_bookmark_in_new_window_via_context_menu (
635- self , bookmark_title : str
624+ self , bookmark_title : str
636625 ) -> BasePage :
637626 """
638627 Right-click bookmark and opens it in a new window via context menu
@@ -647,7 +636,7 @@ def open_bookmark_in_new_window_via_context_menu(
647636
648637 @BasePage .context_chrome
649638 def open_bookmark_in_new_private_window_via_context_menu (
650- self , bookmark_title : str
639+ self , bookmark_title : str
651640 ) -> BasePage :
652641 """
653642 Right-clicks bookmark and opens it in a new private window via context menu
@@ -687,8 +676,8 @@ def expect_bookmarks_toolbar_visibility(self, expected: bool) -> None:
687676
688677 #
689678 def set_site_autoplay_permission (
690- self ,
691- settings : Literal ["allow-audio-video" , "block-audio-video" , "allow-audio-only" ],
679+ self ,
680+ settings : Literal ["allow-audio-video" , "block-audio-video" , "allow-audio-only" ],
692681 ) -> BasePage :
693682 """
694683 Open the Site audio-video permission panel and set a specific autoplay setting.
0 commit comments