From 45ce2702b1c03f828c935b63e7e72be447630b72 Mon Sep 17 00:00:00 2001 From: reform Date: Wed, 11 Nov 2026 19:22:28 +0200 Subject: [PATCH] wave: fix OTP entry (focus input[name=code]) + README pitfalls --- README.md | 6 ++++++ wave.py | 18 ++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 3375c8a..6d4917a 100644 --- a/README.md +++ b/README.md @@ -120,6 +120,12 @@ curl -X POST https://connect.composio.dev/mcp \ Wait 10–15 minutes or use a fresh account. - OTP mails come from `noreply@login.composio.dev`; filter by `Date >= run start`, otherwise the signup-verification code from an earlier attempt is picked up. +- OTP entry: the six visible boxes are Radix `div`s, their inner inputs are `aria-hidden` and cannot be + clicked (Playwright reports "element is obscured"). Focus `input[name="code"]` and `keyboard.type(code)`; + the form auto-submits and jumps to `/passkey/enroll`. Clicking `[data-test="otp-input"]` with `force` + does NOT register the keystrokes in the React state. +- `andreas-*`/`andy*` addresses in a used pool can already be reserved but passwordless: the signup form + reports "Этот адрес электронной почты недоступен" on the password step. Take untouched addresses. - The API key is fetched by intercepting the tRPC `consumer.getToken` response (`ck_[A-Za-z0-9_-]{16,}`) or by clicking `Copy` and reading the clipboard (needs `permissions=["clipboard-read","clipboard-write"]`). diff --git a/wave.py b/wave.py index a941180..aaf7f72 100644 --- a/wave.py +++ b/wave.py @@ -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):