zoukankan      html  css  js  c++  java
  • Puppeteer简介

    Puppeteer是一个node库,他提供了一组用来操纵Chrome的API(默认headless也就是无UI的chrome,也可以配置为有UI)
    Puppeteer(中文翻译”木偶”) 是 Google Chrome 团队官方的无界面(无头或无脑Headless)Chrome 工具,它是一个 Node 库,提供了一个高级的 API 来控制 DevTools协议上的无头版 Chrome 。也可以配置为使用完整(非无头)的 Chrome。Chrome 素来在浏览器界稳执牛耳,因此,Chrome Headless 必将成为 web 应用自动化测试的行业标杆。使用 Puppeteer,相当于同时具有 Linux 和 Chrome 双端的操作能力,应用场景可谓非常之多。此仓库的建立,即是尝试各种折腾使用 GoogleChrome Puppeteer;以期在好玩的同时,学到更多有意思的操作。
    作用和Selenium相似,但是不能跨平台,只能用在chrome做自动化测试
    官网:
    大纲:
    • Installation
    • Usage
    • Default runtime settings
    • API Documentation
    • Debugging tips
    • FAQ
    Q: What is the difference between Puppeteer, Selenium / WebDriver, and PhantomJS?
    Selenium / WebDriver is a well-established cross-browser API that is useful for testing cross-browser support.
    Puppeteer works only with Chromium or Chrome. However, many teams only run unit tests with a single browser (e.g. PhantomJS). In non-testing use cases, Puppeteer provides a powerful but simple API because it's only targeting one browser that enables you to rapidly develop automation scripts.
    Puppeteer bundles the latest versions of Chromium.
    Q: Why is the Chrome team building Puppeteer?
    The goals of the project are simple:
    • Provide a slim, canonical library that highlights the capabilities of the DevTools Protocol.
    • Provide a reference implementation for similar testing libraries. Eventually, these other frameworks could adopt Puppeteer as their foundational layer.
    • Grow the adoption of headless/automated browser testing.
    • Help dogfood new DevTools Protocol features...and catch bugs!
    • Learn more about the pain points of automated browser testing and help fill those gaps.
     
     
  • 相关阅读:
    计算直线的交点数
    不容易系列之(4)——考新郎
    神、上帝以及老天爷
    N!
    Number Sequence
    33_ABB机器人智能周期保养与复位操作
    34_WorldZone区域监控功能的使用
    三菱PLC(FX3U)的模拟量应用
    第19集 PLC盒子的使用
    第18集 使用黑盒设计创建宏文件
  • 原文地址:https://www.cnblogs.com/TomBombadil/p/10969572.html
Copyright © 2011-2022 走看看