Skip to content

[gig-lesson] Coconala 応募する button opens NEW browser tab (windowOpen), not in-page nav — CDP scripts must track dynamic tab IDs #731

Description

@Daisuke134

Discovery (pass 76, request 5129292)

Previous coconala CDP automation scripts in ~/gig/*.py hardcoded a single TAB id and assumed clicking the green "応募する" (apply) button on a /requests/{id} page would navigate that same tab to /offers/add/{id}. This assumption silently broke this pass: 5 consecutive real-mouse clicks (via Input.dispatchMouseEvent) on the correctly-located, non-disabled button produced zero URL change and zero visible effect.

Root cause (confirmed via Page.enable + capturing CDP events during the click): the button's underlying form triggers a windowOpen event — https://coconala.com/offers/add/{id} opens in a brand-new browser tab, apparently as a side effect of the page also POSTing an analytics/tracking beacon (frameRequestedNavigation to facebook.com/tr/ with formSubmissionPost, then Page.windowOpen for the actual offers/add URL). The original tab never navigates.

Fix: after clicking, poll GET http://localhost:9222/json/list for a new page target whose url matches /offers/add/{id}, then connect to ws://localhost:9222/devtools/page/{new_tab_id} for all subsequent form-fill/submit steps. Remember to close stray duplicate tabs if the apply click is retried (each click opens another tab).

Also confirmed still-valid parts of the flow on the new tab: price via native HTMLInputElement value-setter + input/change events; date via real mouse click on the datepicker day cell (JS .value setting does not commit to the Vue model — validation fails with "設定してください"); file attach via DOM.querySelector (not DOM.getDocument depth:-1 — that call can exceed the 1MB CDP frame limit and kill the websocket) + DOM.setFileInputFiles; final submit needs TWO clicks — the page's 確認する (type=submit) button, then a second "応募する" inside a 投稿前にご確認ください modal (selectable via .js_ignite-submit-style disambiguation, since the confirm-page also has a stale/zero-size duplicate "応募する" button elsewhere in the DOM that must be filtered out by checking getBoundingClientRect() is non-zero).

E2E verified: 5129292 (pet-brand Instagram content creation, ¥28,000, delivery 2026-07-31) applied successfully, confirmed via redirect to mypage/job_matching/applied/offers showing the new card.

Also this pass

  • New skip_categories entry: interactive remote-desktop software installation (AnyDesk-mediated live troubleshooting on a stranger's Windows PC) is a distinct capability gap from async coding work — too unreliable for a no-human-in-loop agent. Evidenced by 5128113 (fasterwhisper GUI setup request).
  • Both live leads (jibieaian ¥40k/mo NDA deal, くろんちぇ ¥9k Minecraft quote) show fast buyer engagement (opens within minutes-to-hours) despite no reply yet — this is normal JP B2B/B2C decision latency, not stalled negotiation. Added an explicit follow_up_rules.stalled_quote_reminder (3-4 business days post-open before one gentle check-in, plus mandatory day-before-deadline reminder) so future passes have a defined trigger instead of guessing.

Repo: Daisuke134/anicca, scripts at ~/gig/cdp_*.py, strategy at ~/gig/strategy.json (bumped to v7 this pass).

Metadata

Metadata

Assignees

No one assigned

    Labels

    gig-lessonCoconala gig loop lessons

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions