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.
 
 

Puppeteer简介的更多相关文章

  1. Puppeteer笔记(一):Puppeteer简介

    一.Puppeteer简介 Puppeteer是NPM库,它提供了NodeJS高级API来控制Chrome.Puppeteer 默认以无头(无界面)方式运行,但也可以配置为运行有界面的Chrome. ...

  2. puppeteer(三)常用API

    1.Puppeteer 简介 Puppeteer 是一个node库,他提供了一组用来操纵Chrome的API, 通俗来说就是一个 headless chrome浏览器 (当然你也可以配置成有UI的,默 ...

  3. puppeteer入门

    转自: https://www.jianshu.com/p/a89d8d6c007b 作者: ppCode puppeteer新手入门(chromium下载跳坑) ppCode 关注 2017.12. ...

  4. puppeteer 爬虫 pdf 截图 自动化

    puppeteer简介 puppeteer 翻译是操纵木偶的人,利用这个工具,我们能做一个操纵页面的人.puppeteer是一个nodejs的库,支持调用Chrome的API来操纵Web,相比较Sel ...

  5. puppeteer(headless chrome)实现网站登录

    puppeteer简介 puppeteer是Chrome团队开发的一个node库,可以通过api来控制浏览器的行为,比如点击,跳转,刷新,在控制台执行js脚本等等.有了这个神器,写个爬虫,自动签到,网 ...

  6. puppeteer(一)环境搭建——新Web自动化工具(同selenium)

    一.简介 https://github.com/GoogleChrome/puppeteer Puppeteer是一个Node库,它提供了一个高级API来控制DevTools协议上的 Chrome或C ...

  7. 【puppeteer+Node.js安装环境】之步骤

    步骤一:首先,安装node.js环境,从官网下载最新的安装包. 步骤二:安装完成之后,再安装npm,通过命令行输入:npm install -g cnpm --registry=https://reg ...

  8. puppeteer UI自动化测试demo(一)

    一.简介 这个不大常见,比较常见的是selenium和weddriver: 所以就增加一个说明,来自官网的. Puppeteer 是一个 Node 库,它提供了一个高级 API 来通过 DevTool ...

  9. Puppeteer爬虫实战(一)

    Puppeteer 爬虫技术实践 信息简介 Puppeteer是Chrome开发团队发布的一个通过Chrome DevTool Protocol来控制浏览器Chrome(下文若无显式称呼Chromiu ...

随机推荐

  1. Python+flask+flask-apscheduer实现定时下发任务

    Python+flask+flask-apscheduer实现定时下发任务 背景: 使用python+flask+mamaca实现的自动化用例管理平台,可以下发任务到具体的节点,进行执行测试用例,没有 ...

  2. PowerShell 【Switch篇】

    如果你学过其他的高级语言一定对Switch不陌生,下面讲解一下基本语法. 例1: 1 $n=Get-Random 5 2 $s='小明考试得分' 3 switch($n) 4 { 5 0 {$m=30 ...

  3. Echart可视化学习(六)

    文档的源代码地址,需要的下载就可以了(访问密码:7567) https://url56.ctfile.com/f/34653256-527823386-04154f 柱状图定制 官网找到类似实例, 适 ...

  4. Educational Codeforces Round 117 (Rated for Div. 2)

    Educational Codeforces Round 117 (Rated for Div. 2) A. Distance https://codeforces.com/contest/1612/ ...

  5. STM32寄存器深入分析

    可能很多刚开始学习STM32的小伙伴都有一个疑惑,创建项目时会需要很多头文件,导致学习过程中很难明白那些头文件的作用,虽然知道头文件都是对寄存器的封装,但是怎么封装的就不知道了.这里我以led灯为试验 ...

  6. android-sdk环境变量配置

    1.android-sdk环境变量 1.在系统变量新建:ANDROID_HOME,对应变量值为:G:\android-sdk-windows(sdk安装路径) 2.path添加两个变量(tools和p ...

  7. 深入浅出 CSS 动画

    本文将比较全面细致的梳理一下 CSS 动画的方方面面,针对每个属性用法的讲解及进阶用法的示意,希望能成为一个比较好的从入门到进阶的教程. CSS 动画介绍及语法 首先,我们来简单介绍一下 CSS 动画 ...

  8. Ubuntu 18.04 server安装+搭建Seacms v10.1网站

    0x00 写在前面 以前我天真的认为,ubuntu Desktop会安装了,server就无所谓了,其实完全不然,server还是有一些坑点的. 之所以选择Seacms搭建网站,是因为这个SeaCMS ...

  9. GNU C字节对齐__attribute__((aligned(n))) #pragma pack(n)

    在阅读gnu软件c源代码时,经常会遇到字节对齐相关操作,比如uboot命令相关的代码中,会遇到__attribute__((aligned(n)))扩展关键字,#pragma pack(n)预处理指令 ...

  10. 【刷题-LeetCode】207. Course Schedule

    Course Schedule There are a total of numCourses courses you have to take, labeled from 0 to numCours ...