Selenium is most popular tool to write automation tests as of now. Selenium uses webdriver which can have few bugs and does not have vast control of browser like Nodejs tools. So Puppeteer and playwright are getting famous to automate end to end testing. Playwright and Puppeteer and mostly similar, main difference is playwright support muliple browsers while puppeteer suppors only chromium based.
Table of Contents #
- Design Techniques
Node installation #
To start with the setup make sure you have nodejs installed on your system, Do this by running following commands.
$ node -v
$ npm -v
If these commands are not available install nodejs from https://nodejs.org/.
Create a new project #
Create a new directory, goto that newly created directory
npm init -y
npm i -D playwright
Third Example #
Fourth Example #
Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated ! For feedback, please ping me on Twitter.