playwright-demos icon indicating copy to clipboard operation
playwright-demos copied to clipboard

playwright for scrapping and UI testing / automate testing workflows

playwright-demos

Playwright is a Node library to automate the Chromium, WebKit and Firefox browsers with a single API. It enables cross-browser web automation that is ever-green, capable, reliable and fast.

Found this project useful?

If you found this project useful, then please consider giving it a ⭐️ on Github and sharing it with your friends via social media.

Prerequisites

If you are new to node.js, first install node.js >= 10.15.0

Run the Repo app locally

  1. git clone https://github.com/nmanikiran/playwright-demos.git

  2. cd playwright-demos && npm install

  3. npm start | yarn start | node <filename>.js

Examples

  1. Launch Webpage

  2. Web Page Content

  3. Web page Screnshot

  4. Access DOM

  5. Create Webpage PDF

  6. Mobile Emulation

  7. Web Workers list

  8. Frame(s)

  9. Color scheme change

  10. Cookies

  11. File Upload

  12. Accessibility

    • Webpage Accessibility
    • Accessibility Report
  13. Performance

    • Page load time(s)
    • Timeline
    • Page Metrics
    • JS Code Coverage
    • Frame rate
  14. Network

    • Log Newtwork Calls
    • Intercept XHR with Mock
  15. PWA

    • Disable Javascript
    • Offline
    • Lighhouse / Audit
  16. Scraping

    • TodoMvc Meta Data
    • IMDB Movie List
    • Amazon Price Tracker
    • Infinite Scroll Data
  17. CDPSessions

    • Play back Rate
  18. Automation / E2E

    • Multi Step Form Submittion
  19. Visual Testing

    • Record video

TODO

- Add test cases
- image snapshot tests
- Improve Docs

Contributing

Awesome! Contributions of all kinds are greatly appreciated. To help smoothen the process we have a few non-exhaustive guidelines to follow which should get you going in no time.

Using GitHub Issues

  1. Feel free to use GitHub issues for questions, bug reports, and feature requests
  2. Use the search feature to check for an existing issue Include as much information as possible and provide any relevant resources (Eg. screenshots)

Created & Maintained By

Mani Kiran | @nmanikiran

Feel free to reach out to me through @nmanikiran if you have any questions or feedback! 😊