Skip to content

Commit

Permalink
Wait for css name instead of xpath for totp input field
Browse files Browse the repository at this point in the history
  • Loading branch information
sunetfreitag committed Oct 15, 2024
1 parent ea9c7a0 commit 44bfbe9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mfazones-docker/test_mfazones_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def nodelogin(nextcloudnode='localhost:8443',user='selenium'):
# g_logger.info(f'No need to select TOTP provider')

totp = pyotp.TOTP(nodetotpsecret)
g_wait.until(EC.presence_of_element_located((By.XPATH, '//*[@id="body-login"]/div[1]/div/main/div/form/input'))).send_keys(totp.now() + Keys.ENTER)
g_wait.until(EC.presence_of_element_located((By.NAME, 'challenge'))).send_keys(totp.now() + Keys.ENTER)
return

class TestMfaZonesSelenium(unittest.TestCase):
Expand Down

0 comments on commit 44bfbe9

Please sign in to comment.