This commit is contained in:
2026-05-21 06:29:31 +02:00
parent 5785a387cd
commit 15eed6b4c3
3 changed files with 2125 additions and 10 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+11
View File
@@ -128,8 +128,12 @@ def _okta_mfa_present(page):
'input[name*="code"]', 'input[name*="code"]',
'input[placeholder*="code" i]', 'input[placeholder*="code" i]',
]: ]:
try:
if page.query_selector(sel): if page.query_selector(sel):
return True return True
except Exception:
# Page navigated during selector, skip
pass
return False return False
@@ -141,13 +145,20 @@ def _fill_otp(page, otp):
'input[type="tel"]', 'input[type="tel"]',
'input[placeholder*="code" i]', 'input[placeholder*="code" i]',
]: ]:
try:
el = page.query_selector(sel) el = page.query_selector(sel)
if el: if el:
el.fill(otp) el.fill(otp)
page.keyboard.press("Enter") page.keyboard.press("Enter")
return return
except Exception:
# Page navigated, continue to next selector
pass
try:
page.keyboard.type(otp) page.keyboard.type(otp)
page.keyboard.press("Enter") page.keyboard.press("Enter")
except Exception:
pass
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
File diff suppressed because it is too large Load Diff