Handle MFA modal on login

This commit is contained in:
gregory 2025-12-03 09:49:27 -05:00
parent 85c3e5cef0
commit 9f65e65896
2 changed files with 19 additions and 1 deletions

View File

@ -112,6 +112,16 @@ password.send_keys(config['main']['password'])
password.submit() 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" # Wait for app to load and naviagte to Reservations "page"
try: try:
WebDriverWait(driver, timeout).until( WebDriverWait(driver, timeout).until(

View File

@ -123,7 +123,15 @@ password = driver.find_element(By.ID, 'password')
password.send_keys(config['main']['password']) password.send_keys(config['main']['password'])
password.submit() 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" # Wait for app to load and naviagte to students "page"
try: try:
WebDriverWait(driver, timeout).until( WebDriverWait(driver, timeout).until(