Skip to content

Commit 55be638

Browse files
Hani YacoubHani Yacoub
authored andcommitted
get rid of get element
1 parent 445396a commit 55be638

6 files changed

+10
-6
lines changed

tests/password_manager/test_about_logins_navigation_from_context_menu.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ def test_about_logins_navigation_from_login_form_context_menu(driver: Firefox):
2626

2727
# Access the manage passwords in context menu from the username field in the demo login form
2828
login.open()
29-
username_field = login.get_element("username-field")
30-
login.context_click(username_field)
29+
login.context_click("username-field")
3130
context_menu.click_and_hide_menu("context-menu-manage-passwords")
3231

3332
# Verify that the about:logins page is opened in a new tab

tests/password_manager/test_auto_saved_generated_password_context_menu.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ def add_to_prefs_list():
1616
return [("signon.rememberSignons", True)]
1717

1818

19+
UPDATE_DOORHANGER_TEXT = "Update password for mozilla.github.io?"
20+
21+
1922
def test_auto_saved_generated_password_context_menu(driver: Firefox):
2023
"""
2124
C2248176 - Securely Generated Password is auto-saved when generated from password field context menu
@@ -43,7 +46,7 @@ def test_auto_saved_generated_password_context_menu(driver: Firefox):
4346
update_doorhanger = autofill_popup_panel.get_element(
4447
"password-update-doorhanger"
4548
)
46-
assert update_doorhanger.text == "Update password for mozilla.github.io?"
49+
assert update_doorhanger.text == UPDATE_DOORHANGER_TEXT
4750

4851
# Navigate to about:logins page
4952
tabs.switch_to_new_tab()

tests/password_manager/test_can_view_password_when_PP_enabled.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def test_password_can_be_shown(driver: Firefox):
1616
"""
1717
C2264688: Verify that the Show Password button prompts for the Primary Password before revealing the saved login
1818
"""
19-
# instantiate object
19+
# Instantiate object
2020
about_logins = AboutLogins(driver)
2121
about_prefs = AboutPrefs(driver, category="privacy")
2222
ba = BrowserActions(driver)

tests/password_manager/test_changes_made_in_edit_mode_are_saved.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def test_changes_made_in_edit_mode_are_saved(driver: Firefox):
1313
"""
1414
C2241121 - Verify that changes made in Edit Mode are saved
1515
"""
16-
# instantiate object
16+
# Instantiate object
1717
about_logins = AboutLogins(driver)
1818

1919
# Open about:logins and add a new login

tests/password_manager/test_saved_hyperlink_redirects_to_corresponding_page.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def test_saved_hyperlink_redirects_to_corresponding_page(driver: Firefox):
3838
)
3939

4040
# Click on the hyperlink website
41-
about_logins.get_element("website-address").click()
41+
about_logins.click_on("website-address")
4242
about_logins.switch_to_new_tab()
4343
about_logins.url_contains("mozilla.github")
4444

tests/password_manager/test_update_login_via_doorhanger.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def test_update_login_via_doorhanger(driver: Firefox):
6161
# Select Reveal password from password field context menu for headed run purpose only
6262
password_field = login_autofill.get_element("password-login-field")
6363
login_autofill.context_click(password_field)
64+
# login_autofill.context_click("password-login-field")
65+
6466
context_menu.click_and_hide_menu("context-menu-reveal-password")
6567

6668
# Verify the password matches updated password value

0 commit comments

Comments
 (0)