From 9f65e65896d8e7447bb734f7e114c790c9a14793 Mon Sep 17 00:00:00 2001 From: gregory Date: Wed, 3 Dec 2025 09:49:27 -0500 Subject: [PATCH] Handle MFA modal on login --- make_reservations.py | 10 ++++++++++ save_progress_reports.py | 10 +++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/make_reservations.py b/make_reservations.py index 04aa16a..3d413ef 100644 --- a/make_reservations.py +++ b/make_reservations.py @@ -112,6 +112,16 @@ password.send_keys(config['main']['password']) password.submit() +# MFA MODAL CHECK +try: + WebDriverWait(driver, timeout).until( + EC.presence_of_all_elements_located((By.XPATH, '//button[@data-cy="remind-me-next-time-mfa"]')) + ) + mfa_btn = driver.find_element(By.XPATH, '//button[@data-cy="remind-me-next-time-mfa"]') + mfa_btn.click() +except: + pass + # Wait for app to load and naviagte to Reservations "page" try: WebDriverWait(driver, timeout).until( diff --git a/save_progress_reports.py b/save_progress_reports.py index 226446d..88d245f 100644 --- a/save_progress_reports.py +++ b/save_progress_reports.py @@ -123,7 +123,15 @@ password = driver.find_element(By.ID, 'password') password.send_keys(config['main']['password']) password.submit() - +# MFA MODAL CHECK +try: + WebDriverWait(driver, timeout).until( + EC.presence_of_all_elements_located((By.XPATH, '//button[@data-cy="remind-me-next-time-mfa"]')) + ) + mfa_btn = driver.find_element(By.XPATH, '//button[@data-cy="remind-me-next-time-mfa"]') + mfa_btn.click() +except: + pass # Wait for app to load and naviagte to students "page" try: WebDriverWait(driver, timeout).until(