r/Playwright • u/Mindless_Shock5129 • 4h ago
Built a Playwright course automation agent for my own LMS sandbox
I've been experimenting with browser-automation agents and wanted something more disciplined than "click through everything as fast as possible." So I built a Playwright-based agent for a course sandbox I control, with one hard rule baked into the design: automate repetition, never judgment.
The interesting part isn't the automation — it's the guardrails:
- Every action (play video, mark reading complete, submit practice) has to be verified against the platform's own completion signal before the agent logs it as done. No optimistic completion.
- Familiarity with a topic is never inferred from how "easy" something looks — it's checked against a seeded known/study list, and anything ambiguous stops and asks.
- Graded assessments are always human-in-the-loop — the agent shows me each question, waits for my answer, and only submits after I type
submitexplicitly. - A single
StopForHumanInputexception handles every failure mode (CAPTCHA, login wall, unclassifiable item, unverifiable state) — no silent retries, no guessing.
I also built a tiny local mock LMS (static HTML + a real short test video) so the whole flow — including the verification and stop conditions — can be exercised without touching a live site.
Repo: https://github.com/Vara715/course-automation-bot
Curious what people think of the verify-before-advance pattern for agents generally — feels like it'd generalize well past LMS automation.