📜  Puppeteer 和Selenium 的区别

📅  最后修改于: 2021-09-12 10:57:49             🧑  作者: Mango

1.傀儡师:
它是用于自动化 Chrome 的 node.js 库。这个库是开源的,并提供了一个高级 API 来控制 Chrome。 Puppeteer 由 Google 自己开发并在 Chromium 上运行脚本。默认情况下,Chromium 在 Puppeteer 中无头运行,但可以切换到有头 Chromium。

2.Selenium:
它是一个用于测试 Web 应用程序的框架。它是一个可以自动化 Web 浏览器的伞形项目。它支持不同类型的网络浏览器,如 Firefox、Chrome 等Selenium可用于Python、JavaScript 和少数其他语言。 Selenium与 Appium 一起使用时还支持对移动设备的测试。 Puppeteer 和Selenium 的区别:

S.No. Puppeteer Selenium
1. It was developed by Google. It was originally developed by Jason Huggins in 2004.
2. It is Node.js library. It is a web framework for testing web applications.
3. It works only with Chrome or Chromium and does not support other browsers. Multiple browser support is given by Selenium.
4. It was released in 2017. It was released in 2004.
5. Puppeteer is faster than Selenium. Selenium is slower as compared to Puppeteer.
6. It supports only Node.js. It supports multiple language like Python, Ruby, Javascript, etc.
7. No cross platform support is provided. Cross platform support is provided.
8. It supports only web automation. Supports web automation and mobile automation both.
9. Screen shot can be taken of both PDFs and Images. No PDFs screenshot support is provided.