From a62f1fb33a508fd9d4f8908f7b3d18af8d624940 Mon Sep 17 00:00:00 2001 From: Glen Goulter Date: Thu, 1 Aug 2024 11:55:17 -0700 Subject: [PATCH] Clear netid field before proceeding with the rest of the test --- tests/conftest.py | 1 + tests/test_2fa_duo.py | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index ddc1bc5..420976b 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -296,6 +296,7 @@ def inner(current_browser: Chrome, netid: str, password: Optional[str] = default assert_success = password == default_password match_service_provider = sp_domain(match_service_provider) if match_service_provider else '' current_browser.wait_for_tag('p', 'Please sign in.') + current_browser.find_element(By.ID, "weblogin_netid").clear() current_browser.send_inputs(netid, password) current_browser.click(Locators.submit_button) if assert_success: diff --git a/tests/test_2fa_duo.py b/tests/test_2fa_duo.py index 81faae6..c2c5ada 100644 --- a/tests/test_2fa_duo.py +++ b/tests/test_2fa_duo.py @@ -101,6 +101,7 @@ def test_forced_reauth_2fa(self): sp = ServiceProviderInstance.diafine12 with self.utils.using_test_sp(sp): self.browser.get(self.sp_shib_url(sp, append='mfaforce')) + self.browser.find_element(By.ID, "weblogin_netid").clear() self.browser.send_inputs(self.netid, self.password) self.browser.click(Locators.submit_button) self.enter_duo_passcode(self.browser, match_service_provider=sp, is_this_your_device_screen=False)