- Puppeteer - Discussion
- Puppeteer - Useful Resources
- Puppeteer - Quick Guide
- Puppeteer - Capture Screenshot
- Puppeteer - Synchronization
- Puppeteer - Disable JavaScript
- Puppeteer - Device Emulation
- Puppeteer - Getting Element Attribute
- Puppeteer - Getting Element Text
- Puppeteer - Keyboard Simulation
- Puppeteer - Handling Frames
- Handling Edit Boxes & Checkboxes
- Puppeteer - Handling Links/Button
- Puppeteer - Attribute Selector
- Puppeteer - Id Selector
- Name Selector & Class Name Selector
- Puppeteer - Type Selector
- Puppeteer - Xpath Axes
- Puppeteer - Relative Xpath
- Puppeteer - Absolute Xpath
- Puppeteer - Xpath Grouping
- Puppeteer - Xpath Attributes
- Puppeteer - Xpath Functions
- Puppeteer - Locators
- Puppeteer - Handling Drop-downs
- Puppeteer - Handling Confirm Alerts
- Puppeteer - Chrome
- Puppeteer - Firefox
- Puppeteer - Basic Commands
- Puppeteer - Handling Tabs
- Puppeteer - Browser Operations
- Comparison Between Puppeteer & Cypress
- Comparison Between Puppeteer & Protractor
- Comparison Between Puppeteer & Selenium
- Puppeteer - Non Headless Execution
- Puppeteer - Basic Test
- Puppeteer - Installation
- Puppeteer VS Code Configuration
- Puppeteer - NodeJS Installation
- Puppeteer - Usage of Google
- Puppeteer - Element Handling
- Puppeteer - Introduction
- Puppeteer - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Puppeteer - Introduction
Puppeteer is used for automation and streampning of the frontend development and testing respectively. It was introduced by Google. Puppeteer is based on the Node.js pbrary and is open-source.
Puppeteer contains APIs to interact and manage Chrome browser in headless mode or Chromium (following the protocols in DevTools). However, it can also be used for non-headless execution on browsers pke Chrome/Chromium/Edge/Firefox.
Puppeteer can be used for the automating majority of UI testing, keyboards, mouse movements, and so on. It can be used to test apppcations developed in Angular and Angularjs. The actions pke web page crawpng and scraping can be performed with Puppeteer.
Puppeteer is not considered as an automation tool pke Selenium, Cypress, Protractor, and so on. It is mostly used to manage the internal features of the Chromium browser. We can open DevTools in the Chrome browser, by pressing F12 or Command+Option+C(in MacOS).
Puppeteer is pke a development tool as it is capable of performing a majority of tasks performed by a developer pke handpng requests and responses, locating elements, network traffic and performance, and so on.
If we follow the npm trends for Puppeteer download for the last few years, we shall observe an upward trend towards the use of Puppeteer (available from the below pnk) −
Puppeteer Architecture
Puppeteer utipses the Node pbrary that gives a top-class API for managing Chromium or Chrome browsers. This is done by following the protocols of DevTools.
Puppeteer has the below hierarchy −
Browser(with/without headless mode) − The browser performs the actions to be executed on the browser engine.
Chromium Development Project or CDP − The Chromium is the real place where all the operations are executed. The browsers - Microsoft Edge and Chrome utipse Chromium as browser engine.
Puppeteer − This is actually a package based on the node module.
Automation test code − This is also known as the Nodejs level. Here, the actual automation code is developed by the end-user using JavaScript.