Skip to content

Commit

Permalink
update tests to use new functions
Browse files Browse the repository at this point in the history
  • Loading branch information
goulter committed Jul 29, 2024
1 parent 4d7cfaf commit 80ff1a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_2fa_duo.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def test_2fa_session_multiple_crn(self, netid10, enter_duo_passcode):
self.browser.send_inputs(netid10, self.password)
self.browser.click(Locators.submit_button)
self.browser.wait_for_tag('div', 'Select a UW NetID for 2nd factor authentication.')
self.browser.find_element_by_xpath("//input[@value='sptest07']").click()
self.browser.find_element(By.XPATH, "//input[@value='sptest07']").click()
self.browser.click(Locators.submit_button)
enter_duo_passcode(self.browser, match_service_provider=self.sp)

Expand Down
6 changes: 4 additions & 2 deletions tests/test_password_sign_on.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
from tests.helpers import Locators
from tests.models import ServiceProviderInstance

from selenium.webdriver.common.by import By


def add_suffix(suffix: str, netid: str) -> str:
return f'{netid}{suffix}'
Expand Down Expand Up @@ -103,7 +105,7 @@ def test_new_session_standard_bad_creds(self):
self.browser.send_inputs(bad_netid, self.password)
self.browser.click(Locators.submit_button)
self.browser.wait_for_tag('p', 'Your sign-in failed.')
element = self.browser.find_element_by_id('weblogin_netid')
element = self.browser.find_element(By.ID, 'weblogin_netid')
element.click()
element.clear()
bad_password = '1'
Expand Down Expand Up @@ -208,6 +210,6 @@ def test_query_parameters(self, netid):
self.browser.snap()
self.browser.get(url)
self.browser.wait_for_tag('h1', 'query parameters')
element = self.browser.find_elements_by_tag_name('p')
element = self.browser.find_elements(By.TAG_NAME, 'p')
for snippet in ('fname = Joe', 'lname = Smith', 'age = 30'):
assert (snippet in element[1].text)

0 comments on commit 80ff1a3

Please sign in to comment.