当前位置:网站首页>puppeteer入门之 Page 类
puppeteer入门之 Page 类
2022-06-12 16:03:00 【crayon-shin-chan】
文档:puppeteer/api.md at main · puppeteer/puppeteer · GitHub
1.简介
Page 提供了与 Chromium 中的单个选项卡或扩展背景页面交互的方法。
一个Browser实例可能有多个Page实例。
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
await browser.close();
})();2.事件
page可以响应以下事件
export declare interface PageEventObject {
close: never;
console: ConsoleMessage;
dialog: Dialog;
domcontentloaded: never;
error: Error;
frameattached:边栏推荐
- FPGA (III) trigger and latch
- Explanation of socket principle (where, what and how to use it)
- 小飞页升级变智能修复Bug更快速了
- org. xml. sax. SAXParseException; lineNumber: 63; columnNumber: 10; The definition of "mapper" in the related type must be matched with "(CAC
- 作业提交说明 上传作业到网盘中
- The nohup command uses
- go net库(待续)
- The small flying page is upgraded to be intelligent and the bug repair is faster
- VIM installation and common commands
- Axure RP 9 for Mac(交互式产品原型设计工具)中文版
猜你喜欢

Explanation of socket principle (where, what and how to use it)

Use of multithreading

UDP summary (tcp/ip details volume 1/2)

< 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(六)

Application of postman-rest client plug-in

Axure RP 9 for Mac(交互式产品原型设计工具)中文版

Saga architecture pattern: implementation of cross service transactions under microservice architecture

Decision tree classification and examples

Office VR porn, coquettish operation! The father of Microsoft hololens resigns!

鼻孔插灯,智商上升,风靡硅谷,3万就成
随机推荐
The difference between TCP and UDP, the three handshakes of TCP and the four waves of TCP
一步步创建包含自定义 Screen 的 ABAP 程序的详细步骤
Method reference instance method reference
ER diagram made by StarUML based on the last student achievement management system
【工具推荐】个人本地 markdown 知识图谱软件 Obsidian
Tensorflow function: tf nn. in_ top_ k()
Solution of user and root forgetting password in virtual machine
为什么阿里巴巴不建议MySQL使用Text类型?
Scanpy (VI) analysis and visualization of spatial transcriptome data
Project training of Software College of Shandong University rendering engine system point cloud processing (10)
Escape rules and examples of go
[thinking about the process of structure optimization] how to build the evaluation ability of the impact of technical solutions
File uploading and downloading in SSM
< 山东大学软件学院项目实训 > 渲染引擎系统——辐射预计算(九)
Daily leetcode - 3 Longest substring without duplicate characters
Find the number of cells (connectivity map, wide search, deep search)
IGMP message (tcp/ip details volume 1/ Volume 2)
Axure RP 9 for MAC (interactive product prototyping tool) Chinese version
记一篇IT培训日记067-好人感恩,坏人无错
Introduction and download website of common data of GIS, remote sensing, hydrology and Geography (2), supplementary~