Skip to content

Commit 5d60cdc

Browse files
authored
Merge pull request #158 from mozilla/hy/bookmark_via_bookmarkmenu
hy/ Test bookmark via bookmarks menu
2 parents 1e68628 + c4e2977 commit 5d60cdc

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

modules/data/panel_ui.components.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,5 +155,12 @@
155155
"selectorData": "toolbarbutton.bookmark-item[label*='{title}']",
156156
"strategy": "css",
157157
"groups": []
158+
},
159+
160+
"bookmark-current-tab": {
161+
"selectorData": "panelMenuBookmarkThisPage",
162+
"strategy": "id",
163+
"groups": []
158164
}
165+
159166
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from selenium.webdriver import Firefox
2+
3+
from modules.browser_object_navigation import Navigation
4+
from modules.browser_object_panel_ui import PanelUi
5+
6+
URL_TO_BOOKMARK = "https://www.mozilla.org/"
7+
8+
9+
def test_bookmark_via_bookmark_menu(driver: Firefox):
10+
"""
11+
C2084489: Verify that the user can Bookmark a page from the Bookmarks menu
12+
"""
13+
# instantiate object
14+
nav = Navigation(driver)
15+
panel = PanelUi(driver)
16+
17+
# Bookmark the given website via bookmarks menu
18+
driver.get(URL_TO_BOOKMARK)
19+
panel.open_bookmarks_menu()
20+
with driver.context(driver.CONTEXT_CHROME):
21+
panel.get_element("bookmark-current-tab").click()
22+
nav.get_element("save-bookmark-button").click()
23+
24+
# Verify that the bookmark is displayed in bookmarks menu
25+
panel.open_bookmarks_menu()
26+
panel.element_visible("bookmark-by-title", labels=["Internet for people"])

0 commit comments

Comments
 (0)