notebook
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -128,8 +128,12 @@ def _okta_mfa_present(page):
|
||||
'input[name*="code"]',
|
||||
'input[placeholder*="code" i]',
|
||||
]:
|
||||
if page.query_selector(sel):
|
||||
return True
|
||||
try:
|
||||
if page.query_selector(sel):
|
||||
return True
|
||||
except Exception:
|
||||
# Page navigated during selector, skip
|
||||
pass
|
||||
return False
|
||||
|
||||
|
||||
@@ -141,13 +145,20 @@ def _fill_otp(page, otp):
|
||||
'input[type="tel"]',
|
||||
'input[placeholder*="code" i]',
|
||||
]:
|
||||
el = page.query_selector(sel)
|
||||
if el:
|
||||
el.fill(otp)
|
||||
page.keyboard.press("Enter")
|
||||
return
|
||||
page.keyboard.type(otp)
|
||||
page.keyboard.press("Enter")
|
||||
try:
|
||||
el = page.query_selector(sel)
|
||||
if el:
|
||||
el.fill(otp)
|
||||
page.keyboard.press("Enter")
|
||||
return
|
||||
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
Reference in New Issue
Block a user