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[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
Reference in New Issue
Block a user