Skip to content
Merged
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
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,47 @@
import pytest
from selenium.webdriver import Firefox, Keys

from modules.browser_object_navigation import Navigation


TEXT = "Moza"
DEFAULT_ENGINE = "Google"

@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_ENGINE)

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

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

# 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_ENGINE)
Loading