{"slug": "my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had", "title": "My Submit Script Ticked a Box by Its Text. The Text Changed, and the Function Had No Test", "summary": "A developer running a daily autonomous Claude Code agent on a Windows PC reported that a submit script for a freelance marketplace listing failed after 30 seconds on December 4 because the confirmation dialog's checkbox label text had changed from \"I completed the proof on my profile\" to \"I've confirmed the above.\" The function, which located checkboxes by visible text, timed out safely and nothing was submitted, but the developer noted the failure was luck rather than design: existing flow tests stubbed out the submit function or replaced the step above it, so no test exercised the click that depends on an external page's wording.", "body_md": "*A field note from the autonomous Claude Code agent I run every day on one Windows PC. The numbers come from its own ledgers, not from memory.*\n\n**Free to read first:** a PDF sample of the book behind this setup — its first 3 chapters: [https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample](https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample)\n\nOn December 4 my script tried to submit an updated listing on a freelance marketplace and died after 30 seconds. Nothing had been submitted. I know that because I didn't reopen the edit page; I read the seller's list page, which only reads, and the listing was still in its old state.\n\nPressing \"Submit\" opens a confirmation dialog with two checkboxes and a final Submit button. My function ticks both boxes by their visible text and then presses the button:\n\n```\nfor label in (\"I completed the proof on my profile\", \"I removed the related expressions\"):\n    dialog.get_by_text(label).first.click()\npage_wait(400)\ndialog.get_by_role(\"button\", name=\"Submit\").click()\n```\n\n(The real strings are in Korean and the real code has waits in between; this is the shape.) I wrote it on August 31, for the first listing I submitted there, and the submissions I made with it before December went through.\n\nI wrote a small probe that opens the dialog and clicks nothing. The first box no longer said \"I completed the proof on my profile\". It said \"I've confirmed the above.\" The second box was unchanged. The old function waited for the first text, never found it, and the click timed out. That was a safe way to fail, but it was luck: the function had no rule for what to do with a dialog it didn't recognize.\n\nI had spent two earlier changes locking down the steps before this one: reading the uploaded files back, proving what was sent, checking the attachment slot before submitting. The flow tests I had written around the submit step either replaced the function with a one-line stub that returns True, or replaced the function above it. The click that sits on the other side of an external page's wording was the one thing no test walked through.\n\nI don't know why the text changed or when. My last successful run of this click was before that, so the change happened somewhere in between. The same dialog also has a notice about categories that require proof of qualifications. I found no direct evidence about whether my category is one of them; the only thing pointing the other way is that an earlier version of this listing was approved.\n\n**Where this comes from.** Every post here comes from one setup I run daily: a CLAUDE.md and memory files the agent reads before it touches anything. I also built a separate auditor agent for it that returned PASS or FAIL. The first 3 chapters of the book that walks through it are free as a PDF: [https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample](https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code-free-sample)\n\nThe full edition is 11 chapters plus 4 ready-to-use templates (CLAUDE.md starter, memory files, auditor checklist, measurement guide) and a hands-on section for every chapter, $19 as a PDF: [https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code](https://dbsoul.gumroad.com/l/autonomous-ai-agents-claude-code)\n\nPrefer Google Play? The same book is on Google Play Books: [https://play.google.com/store/books/details?id=hesIEgAAQBAJ](https://play.google.com/store/books/details?id=hesIEgAAQBAJ)\n\nQuestions about the setup are welcome in the comments — I'll answer with what actually happened, not theory.", "url": "https://wpnews.pro/news/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had", "canonical_source": "https://dev.to/dbsoul/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had-no-test-2o6i", "published_at": "2026-12-05 14:10:04+00:00", "updated_at": "2026-12-05 14:13:17.062069+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Claude Code", "Anthropic"], "also_reported_by": [], "takeaway": "Locating UI elements by visible text breaks silently when an external page rewords labels, and stubbing out the submit function in flow tests leaves that dependency untested.", "recommendation": {"advice": "Write tests that exercise text-based UI selectors against the real dialog, and add an explicit fallback rule for unrecognized dialogs instead of relying on timeouts.", "playbook": "coding-agents", "playbook_url": "https://wpnews.pro/playbooks/coding-agents"}, "alternates": {"html": "https://wpnews.pro/news/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had", "markdown": "https://wpnews.pro/news/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had.md", "text": "https://wpnews.pro/news/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had.txt", "jsonld": "https://wpnews.pro/news/my-submit-script-ticked-a-box-by-its-text-the-text-changed-and-the-function-had.jsonld"}}