Need advice about which tool to choose?Ask the StackShare community!
Puppeteer vs Selenium: What are the differences?
Puppeteer: Headless Chrome Node API. Puppeteer is a Node library which provides a high-level API to control headless Chrome over the DevTools Protocol. It can also be configured to use full (non-headless) Chrome; Selenium: Web Browser Automation. Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.
Puppeteer can be classified as a tool in the "Headless Browsers" category, while Selenium is grouped under "Browser Testing".
Puppeteer and Selenium are both open source tools. It seems that Puppeteer with 51.2K GitHub stars and 4.72K forks on GitHub has more adoption than Selenium with 14.9K GitHub stars and 4.97K GitHub forks.
MIT, Typeform, and Bukalapak are some of the popular companies that use Selenium, whereas Puppeteer is used by Huddle, Better, and Orangesys Inc.. Selenium has a broader approval, being mentioned in 777 company stacks & 443 developers stacks; compared to Puppeteer, which is listed in 25 company stacks and 19 developer stacks.
we are having one web application developed in Reacts.js. in the application, we have only 4 to 5 pages that we need to test. I am having experience in selenium with java. Please suggets which tool I should use. and why ............................ ............................ .............................
with the help of selenium we can automate react js for functional testing
I am using Node 12 for server scripting and have a function to generate PDF and send it to a browser. Currently, we are using PhantomJS to generate a PDF. Some web post shows that we can achieve PDF generation using Puppeteer. I was a bit confused. Should we move to puppeteerJS? Which one is better with NodeJS for generating PDF?
You better go with puppeteer. It is basically chrome automation tool, written in nodejs. So what you get is PDF, generated by chrome itself. I guess there is hardly better PDF generation tool for the web. Phantomjs is already more or less outdated as technology. It uses some old webkit port that's quite behind in terms of standards and features. It can be replaced with puppeteer for every single task.
I suggest puppeteer to go for. It is simple and easy to set up. Only limitaiton is it can be used only for chrome browser and currently they are looking into expanding into FF. The next thing is Playwright which is just a scale up of Puppeteer. It supports cross browsers.
My company was looking for a testing tool that would integrate easily with AWS Amplify and quickly provide value. I created a POC for each tool we were exploring and showed it to the team (since we all want to contribute to the testing framework). Cypress was by far the easiest to go from nothing to running tests that were finding bugs in our web application.
The only difficulties I had with Cypress were working with iframes and the fact it does not currently handle new tabs. Cypress currently supports Chrome, Edge, Electron (headless) and has Firefox in beta so if IE is something you need to support, you might want to use another tool in conjunction or in place of Cypress.
Cypress is very well documented with a very responsive support team. Recently the Cypress team released the 'Real World App' as a showcase for implementing good tests with best practices.
Pros of Puppeteer
- Very well documented10
- Scriptable web browser10
- Promise based6
Pros of Selenium
- Automates browsers173
- Testing154
- Essential tool for running test automation101
- Record-Playback24
- Remote Control24
- Data crawling8
- Supports end to end testing7
- Functional testing6
- Easy set up6
- The Most flexible monitoring system4
- End to End Testing3
- Easy to integrate with build tools3
- Comparing the performance selenium is faster than jasm2
- Record and playback2
- Compatible with Python2
- Easy to scale2
- Integration Tests2
- Integrated into Selenium-Jupiter framework0
Sign up to add or upvote prosMake informed product decisions
Cons of Puppeteer
- Chrome only10
Cons of Selenium
- Flaky tests8
- Slow as needs to make browser (even with no gui)4
- Update browser drivers1