Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 1 addition & 22 deletions SELECTOR_INFO.md
Original file line number Diff line number Diff line change
Expand Up @@ -1845,20 +1845,6 @@ Description: Context menu option to move a tab to the start of the tab bar.
Location: Context menu - Tab
Path to .json: modules/data/context_menu.components.json
```
```
Selector Name: context-menu-bookmark-link
Selector Data: context-bookmarklink
Description: Context menu option to bookmark a link
Location: Context menu - topsite context menu
Path to .json: modules/data/context_menu.components.json
```
```
Selector Name: context-menu-search-select
Selector Data: coontext-searchselect
Description: Context menu option to search selected text with the engine set as default
Location: Context menu - topsite context menu
Path to .json: modules/data/context_menu.components.json
```
#### credit_card_fill
```
Selector Name: form-field
Expand Down Expand Up @@ -3161,13 +3147,6 @@ Description: Developer tool icon
Location: Navigation bar
Path to .json: modules/data/navigation.components.json
```
```
Selector Name: status-panel-label
Selector Data: statuspanel-label
Description: Status panel URL label
Location: newtab page bottom left corner on link hover
Path to .json: modules/data/navigation.components.json
```
#### panel_ui
```
Selector name: panel-ui-button
Expand Down Expand Up @@ -3545,7 +3524,7 @@ Description: Edit bookmark panel
Location: Bookmark panel
Path to .json: modules/data/pane_ui.components.json
```

```
#### print_preview
```
Selector name: print-preview-browser
Expand Down
5 changes: 5 additions & 0 deletions modules/browser_object_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,3 +827,8 @@ def verify_status_panel_url(self, expected_url: str):
assert expected_url in actual_url, (
f"Expected '{expected_url}' in status panel URL, got '{actual_url}'"
)

def verify_engine_returned_default(self) -> None:
self.wait.until(
lambda d: self.element_visible("google-default-engine")
)
6 changes: 6 additions & 0 deletions modules/data/navigation.components.json
Original file line number Diff line number Diff line change
Expand Up @@ -609,5 +609,11 @@
"selectorData": "statuspanel-label",
"strategy": "id",
"groups": []
},

"google-default-engine": {
"selectorData": "toolbarbutton#urlbar-searchmode-switcher[label='Google, pick a search engine']",
"strategy": "css",
"groups": []
}
}
11 changes: 11 additions & 0 deletions modules/page_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ def perform_key_combo(self, *keys) -> Page:

return self

@context_chrome
def perform_key_combo_chrome(self, *keys) -> Page:
"""
Perform a keyboard shortcut in the browser chrome context (e.g., address bar).
This method should be used for actions that target browser UI elements such as the
awesome bar or toolbar buttons — not web content.
Example:
self.perform_key_combo_chrome(Keys.COMMAND, "c") # Copy from address bar
"""
return self.perform_key_combo(*keys)

def load_element_manifest(self, manifest_loc):
"""Populate self.elements with the parse of the elements JSON"""
logging.info(f"Loading element manifest: {manifest_loc}")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import pytest
from selenium.webdriver import Firefox, Keys

from modules.browser_object_navigation import Navigation


@pytest.fixture()
def test_case():
return "3028716"


@pytest.mark.parametrize("engine", ["Bing"])
def test_insertion_point_no_search_terms_display(driver: Firefox, engine):
"""
C3028716 - Verify that Insertion Point without search terms is correctly displayed
"""

# Instantiate objects
nav = Navigation(driver)

# Click on the USB and select one of the engines
nav.click_search_mode_switcher()
nav.set_search_mode(engine)

# Click on the url bar
nav.click_in_awesome_bar()

# Press [backspace/Delete in macOS]
nav.perform_key_combo_chrome(Keys.BACKSPACE)

# Check that the selected engine is returned to using default engine
nav.verify_engine_returned_default()

# Type anything in the url bar (example fire)
nav.type_in_awesome_bar("fire")

# Check that there is no Bing "Search Mode", search suggestions populate with default engine
nav.verify_engine_returned_default()

# Press enter key
nav.perform_key_combo_chrome(Keys.ENTER)

# Check that the search is done for "moza" using the default search engine
nav.verify_engine_returned_default()
Loading