wave: fix OTP entry (focus input[name=code]) + README pitfalls
This commit is contained in:
@@ -160,10 +160,14 @@ def run_one(br, mail, imap_pass, bank_path):
|
||||
res.update(stage="imap", err="no code")
|
||||
log(" FAIL no code")
|
||||
return res
|
||||
box = pg.locator('[data-test="otp-input"]').first
|
||||
box.click(force=True)
|
||||
pg.keyboard.type(code, delay=140)
|
||||
pg.wait_for_timeout(6500)
|
||||
try:
|
||||
pg.focus('input[name="code"]')
|
||||
pg.wait_for_timeout(300)
|
||||
pg.keyboard.type(code, delay=170)
|
||||
except Exception:
|
||||
pg.locator('[data-test="otp-input"]').first.click(force=True)
|
||||
pg.keyboard.type(code, delay=170)
|
||||
pg.wait_for_timeout(8500)
|
||||
log(" ->", pg.url[:90], "code:", code)
|
||||
# passkey skip
|
||||
if "passkey" in pg.url or pg.locator('button[name="intent"][value="skip"]').count() > 0:
|
||||
@@ -188,6 +192,12 @@ def run_one(br, mail, imap_pass, bank_path):
|
||||
# key
|
||||
ws = re.match(r"https://dashboard\.composio\.dev/([^/]+)/", pg.url + "/")
|
||||
ws_name = ws.group(1) if ws else ""
|
||||
if not ws_name or ws_name in ("~", ""):
|
||||
pg.goto(DASH + "/", wait_until="domcontentloaded")
|
||||
pg.wait_for_timeout(4500)
|
||||
ws = re.match(r"https://dashboard\.composio\.dev/([^/~]+)/", pg.url + "/")
|
||||
ws_name = ws.group(1) if ws else ""
|
||||
log(" ws resolved:", ws_name, "url:", pg.url[:70])
|
||||
tok = {"v": None}
|
||||
|
||||
def on_resp(r):
|
||||
|
||||
Reference in New Issue
Block a user