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
+20 -9
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]',
]: ]:
if page.query_selector(sel): try:
return True if page.query_selector(sel):
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]',
]: ]:
el = page.query_selector(sel) try:
if el: el = page.query_selector(sel)
el.fill(otp) if el:
page.keyboard.press("Enter") el.fill(otp)
return page.keyboard.press("Enter")
page.keyboard.type(otp) return
page.keyboard.press("Enter") except Exception:
# Page navigated, continue to next selector
pass
try:
page.keyboard.type(otp)
page.keyboard.press("Enter")
except Exception:
pass
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
File diff suppressed because it is too large Load Diff