logoalt Hacker News

Capricorn2481last Wednesday at 1:53 AM1 replyview on HN

But then the AI would theoretically have to write the playwright code. How does it verify it's getting the right page to begin with?


Replies

simonwlast Wednesday at 2:14 AM

The recent models are pretty great at this. They read the source code for e.g. a Python web application and use that to derive what the URLs should be. Then they fire up a localhost development server and write Playwright scripts to interact with those pages at the predicted URLs.

The vision models (Claude Opus 4.5, Gemini 3 Pro, GPT-5.2) can even take screenshots via Playwright and then "look at them" with their vision capabilities.

It's a lot of fun to watch. You can tell them to run Playwright not in headless mode at which point a Chrome window will pop up on your computer and you can see them interact with the site via it.