Skip to content

Commit 46eda32

Browse files
committed
Refix helper function
1 parent c85adf3 commit 46eda32

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

modules/browser_object_navigation.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -579,17 +579,10 @@ def open_bookmark_in_new_tab_via_context_menu(
579579
Argument:
580580
bookmark_title: The title of the bookmark to open
581581
"""
582-
# Right-click the bookmark to make the menu appear
582+
# Right-click the bookmark and open it in new tabe via context menu item
583583
self.panel_ui.element_clickable("bookmark-by-title", labels=[bookmark_title])
584584
self.panel_ui.context_click("bookmark-by-title", labels=[bookmark_title])
585-
586-
# Find the menu item we want to click
587-
# We use .fetch() here to get the element without clicking it yet
588-
menu_item = self.context_menu.fetch("context-menu-toolbar-open-in-new-tab")
589-
590-
# Use ActionChains to perform a more reliable click
591-
actions = ActionChains(self.driver)
592-
actions.move_to_element(menu_item).click().perform()
585+
self.context_menu.click_on("context-menu-toolbar-open-in-new-tab")
593586

594587
return self
595588

0 commit comments

Comments
 (0)