In this video we will be using Playwright Codegen from the Playwright command line interface. Running Codegen you can start up at a blank page or pass your page's url to start the tool at your website. Codegen will make it very quick to create a general script and you can choose a couple different versions of the Playwright syntax to choose from.
Also in the tool are some debugging tools so you can see what Playwright sees. You can navigate to a page and look for selectors or see why selectors in your test aren't finding what you are looking for. In general the Codegen is really nice for learning the syntax and you can easily copy and paste the commands that are valuable. Generally you can clean up the test generated by deleting the extra lines and possibly choosing other selectors that you know will work better.
In general the selectors are decent. It heavily favors text which may or may not be appropriate for your tests. Check out my other video at • Playwright Crash Course with PyTest for a crash course on writing your own tests. The only feature I would like to see added would be a way to add assertions in the tool even at a basic level. But I understand why that is difficult since they wouldn't know which testing framework you are using.
Playwright Installation with NPM - https://playwright.dev/docs/intro
Playwright Installation with Python - https://playwright.dev/python/docs/in...
Playwright Installation with PyTest (Python alternate) - https://github.com/microsoft/playwrig...