Open
Description
🚀 Feature Request
The additional button on the action overlay to take a screenshot of the current viewport. The action overlay is shown in the image below:

I expect this button to generate the line await expect(page).toHaveScreenshot()
.
Example
- Run codegen
- Mess around until you get the state you want to capture
- Click the button on the action overlay to take a screenshot
Motivation
This can eliminate the need to edit the generated test cases and make codegen a truly generative tool, with no need to add anything by hand afterwards. This could save a lot of time in some scenarios. Also, screenshots is a very basic tool that is widely used in Playwright, so the lack of it in codegen doesn't make sense.