playwright
playwright copied to clipboard
docs: add migration from Puppeteer guide
Migration guide from Puppeteer.
The cheat sheet is partially built on https://github.com/checkly/checklyhq.com/blob/main/site/content/guides/puppeteer-to-playwright.md from checkly (MIT license)
Example is my own, tested and both are functionals.
I tried to fit with the style and level of details of the other migrations docs.
Fixes #13646
Requesting review from either @dgozman or @aslushnikov since they know the puppeteer internals quite well! 😄
When we simply migrate users from one syntax to another, we don't really add much value. With Playwright, you are not supposed to use any of the suggested methods, you aren't even supposed to use page.click(), should rather use the strict page.locator.click() instead, should only use web-first assertions for content verification, etc. Would you be interested in putting that together?
Thanks for the feedback @pavelfeldman
Sure, I'll update the PR.
I've updated the cheat sheet section and put more emphasis on Locators in the migration principles. @pavelfeldman let me know what do you think