Open-Source CLI Generates Playwright Locators with AI by Jhoan Sebastian Duque ZapataOpen-Source CLI Generates Playwright Locators with AI by Jhoan Sebastian Duque Zapata

Open-Source CLI Generates Playwright Locators with AI

Portfolio project
Jhoan Sebastian Duque Zapata
Writing and maintaining locators by hand takes a big part of test automation time. So I'm building Test Wise, an open source CLI that generates the Playwright locators of a page with a language model.
How it works today:
You give it a URL: testwise locators https://your-site.com
It opens the page with Playwright and takes its accessibility tree.
A filter with no AI reduces it to what matters: buttons, links, form fields and headings. Less text, lower cost.
It makes a single call to the model and requires a structured answer. Every locator must point to something that exists on the page; if the model invents one, the answer goes back to be fixed.
It saves the result to a page.json file and tells you how many tokens it used.
Some design decisions:
You bring your own model and API key (Anthropic, OpenAI or Gemini). No server in between.
For private pages, you log in by hand once and the session stays on your machine.
If the page needs a login or the file already exists, it stops before spending a single token.
300+ automated tests, none of them call a model.
It's at an early stage. Next up: checking the saved locators against the real page, with zero tokens.
The video shows it in action. Code here, MIT licensed: https://github.com/sebastian946/CLI_TestingAgents
If you work in QA automation: how do you deal with locators that break after a UI change today?
#QAAutomation #Playwright #OpenSource #BuildInPublic #TestsWise #AIEngineering #LLM #Python #Playwright #OpenSource

0 likes · 1 view · Nov 27, 2026

Writing and maintaining locators by hand takes a big part of test automation time. So I'm building Test Wise, an open source CLI that generates the Playwrigh...

Tags