chromedp/chromedp ? reverse-engineered prompt

Reverse engineered prompt

Build me a Go tool that can control Chrome from code so I can automate a few browser tasks without installing any extra driver.

I want to open pages, click buttons, fill in forms, read text from the page, wait for things to load, and take screenshots or save PDFs when needed. It should also handle common browser stuff like multiple tabs, popups, file uploads, cookies, custom headers, and running small bits of JavaScript on the page. If it makes sense, include a simple example that logs in to a site, visits a page, grabs a title or some text, and saves a screenshot.

Keep it easy to use from one Go program, and make it work both in headless mode and with a visible browser window. If there are newer docs or examples that help, look them up online and follow the current best way to do it.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab