File tree Expand file tree Collapse file tree 3 files changed +50
-0
lines changed
tests/address_bar_and_search Expand file tree Collapse file tree 3 files changed +50
-0
lines changed Original file line number Diff line number Diff line change @@ -2330,6 +2330,13 @@ Description: bsky website sign in button
23302330Location: Bsky website
23312331Path to .json: modules/data/generic_page.components.json
23322332```
2333+ ```
2334+ Selector Name: url-to-copy
2335+ Selector Data: "p[contenteditable]"
2336+ Description: Clipboard page to copy url
2337+ Location: Clipboard test page
2338+ Path to .json: modules/data/generic_page.components.json
2339+ ```
23332340#### generic_pdf
23342341```
23352342Selector Name: highlighted-text
Original file line number Diff line number Diff line change 7676 "selectorData" : " //button[@aria-label='Sign in']" ,
7777 "strategy" : " xpath" ,
7878 "groups" : []
79+ },
80+
81+ "url-to-copy" : {
82+ "selectorData" : " p[contenteditable]" ,
83+ "strategy" : " css" ,
84+ "groups" : []
7985 }
8086}
Original file line number Diff line number Diff line change 1+ import pytest
2+ from selenium .webdriver import Firefox , Keys
3+
4+ from modules .browser_object_navigation import Navigation
5+ from modules .page_object_generics import GenericPage
6+
7+ CLIPBOARD_PAGE = "https://bug1320502.bmoattachments.org/attachment.cgi?id=8814655"
8+ URL = "https://developer.mozilla.org"
9+
10+
11+ @pytest .fixture ()
12+ def test_case ():
13+ return "3028883"
14+
15+
16+ def test_paste_and_go_opens_correct_url (driver : Firefox ):
17+ """
18+ C3028883 - "Paste and Go" opens the right URL
19+ """
20+
21+ # Instantiate objects
22+ nav = Navigation (driver )
23+ page = GenericPage (driver , url = CLIPBOARD_PAGE )
24+
25+ # Copy the link from the clipboard
26+ page .open ()
27+ page .click_on ("url-to-copy" )
28+ page .perform_key_combo (Keys .CONTROL , "a" )
29+ page .copy ()
30+
31+ # Open a new tab and right click in the Address bar and choose Paste and Go
32+ nav .open_and_switch_to_new_window ("tab" )
33+ nav .get_awesome_bar ()
34+ nav .click_and_hide_menu ("context-menu-paste-and-go" )
35+
36+ # Check that the page is displayed
37+ nav .url_contains (URL )
You can’t perform that action at this time.
0 commit comments