{"slug": "inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed", "title": "inner_text() Doesn't Read Form Fields: An 18-Day Blocker That Never Existed", "summary": "A developer running an autonomous Claude Code agent on a Windows PC reported that the agent misread a storefront settings page for 18 days because it used Playwright's inner_text() on the page body, which does not return the value of <input> or <textarea> elements. The agent concluded three required fields were empty when they had been filled in all along, and the correct approach is reading each element's value via input_value() or eval_on_selector_all. The developer also noted the agent had an existing logged-in browser profile for a mailbox it claimed it could not access, leaving an unread notification that pointed to the real issue.", "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\nThis one is short, and I wish someone had told my agent earlier.\n\nMy agent manages a few storefronts through a headless browser (Playwright). One store had a settings page with three required fields: country, address, phone number. The agent read that page twice, eleven days apart, with the same line:\n\n```\ntext = page.inner_text(\"body\")\n```\n\nBoth times the three values were not in the text. Both times it concluded that the fields were empty, and it put \"fill in the three settings fields\" at the top of my to-do list, as the most important human task for the whole project.\n\nIt stayed there for 18 days.\n\nWhen I finally asked the agent to do the task itself, it read each field's value this time, and all three were already filled in. They had been filled in the whole time.\n\n`inner_text()` returns the rendered text of elements. The value of an `<input>` or `<textarea>` is not text content, so it does not appear. An input with a value and an input without one produce the same result: nothing.\n\nThe correct read is the element's value:\n\n```\npage.locator(\"input[name=phone]\").input_value()\n# or, for every field at once\npage.eval_on_selector_all(\"input, textarea\",\n                          \"els => els.map(e => [e.name, e.value])\")\n```\n\nThe store had also sent a notification about the account. The agent had marked it \"cannot read — no access to that mailbox\" and left it to me. It turned out the agent already had a logged-in browser profile for the same mail service (created weeks earlier for a different job). It could have read the message on day one. The real reason in that message had nothing to do with the settings fields.\n\nSo there were two gaps stacked on each other:\n\n`value`, never page text.\nThe cost of the original mistake was not the 18 days. It was that the most important item on my list was pointing at something that didn't need doing, while the thing that did need doing sat unread in a mailbox.\n\n**Want the whole system?** The book has 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. It's $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\nNot sure yet? The first three chapters are free, same PDF format: [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\nQuestions about the setup are welcome in the comments — I'll answer with what actually happened, not theory.", "url": "https://wpnews.pro/news/inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed", "canonical_source": "https://dev.to/dbsoul/innertext-doesnt-read-form-fields-an-18-day-blocker-that-never-existed-2pac", "published_at": "2026-09-26 04:10:06+00:00", "updated_at": "2026-09-26 04:59:55.325613+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "developer-tools"], "entities": ["Claude Code", "Playwright", "Windows"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed", "markdown": "https://wpnews.pro/news/inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed.md", "text": "https://wpnews.pro/news/inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed.txt", "jsonld": "https://wpnews.pro/news/inner-text-doesn-t-read-form-fields-an-18-day-blocker-that-never-existed.jsonld"}}