当前位置:网站首页>puppeteer入门之 BrowserContext 类
puppeteer入门之 BrowserContext 类
2022-06-12 16:03:00 【crayon-shin-chan】
文档:puppeteer/api.md at main · puppeteer/puppeteer · GitHub
1.简介
BrowserContexts 提供了一种操作多个独立浏览器会话的方法。
启动浏览器时,使用一个默认 BrowserContext。
browser.newPage()方法在默认浏览器上下文中创建一个页面。
如果页面打开另一个页面,通过window.open,弹出窗口将属于父页面的浏览器上下文。
Puppeteer 允许创建隐身浏览器上下文
隐身浏览器上下文不会将任何浏览数据写入磁盘。
2.创建上下文
createIncognitoBrowserContext方法可以创建隐身浏览器上下文
const context = await browser.createIncognitoBrowserContext();
const page = await context.newPage();
await page.goto('https://example.com');
await context.close();3.browser
获取上下文所属浏览器
browser(): Browser;4.pag
边栏推荐
- 位运算例题(待续)
- MySQL development considerations (Alibaba development manual)
- The small flying page is upgraded to be intelligent and the bug repair is faster
- < 山东大学软件学院项目实训 > 渲染引擎系统——基础渲染器(四)
- With a lamp inserted in the nostril, the IQ has risen and become popular in Silicon Valley. 30000 yuan is enough
- File uploading and downloading in SSM
- What is JUC in high concurrency programming
- tinyint和int区别
- Points chocolate (two points answer) Blue Bridge Cup provincial competition
- 广播和多播(TCP/IP详解卷1/2)
猜你喜欢

【光源实用案例】 UV-LED固化创新,让产线变得更丝滑

Why doesn't Alibaba recommend MySQL use the text type?

Axure RP 9 for MAC (interactive product prototyping tool) Chinese version

从斐波那契数列求和想到的俗手、本手和妙手

Defer learning in golang
![[practical case of light source] UV-LED curing innovation makes the production line more smooth](/img/6f/04f52a37782c54b1050f908f46eadf.png)
[practical case of light source] UV-LED curing innovation makes the production line more smooth

Project training of Software College of Shandong University rendering engine system basic renderer (6)

鼻孔插灯,智商上升,风靡硅谷,3万就成

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

org. xml. sax. SAXParseException; lineNumber: 63; columnNumber: 10; The definition of "mapper" in the related type must be matched with "(CAC
随机推荐
[tool recommendation] personal local markdown knowledge map software
Solution to idea Chinese prism garbled code error -- console Chinese output prism garbled code
5G新方案!升级现有的基站和UE模拟器至5G毫米波频段
C语言 分割bin文件程序
The difference between TCP and UDP, the three handshakes of TCP and the four waves of TCP
如何使用Grafana轻松实现OVL数据可视化
MySQL blob and text types
【光源实用案例】 UV-LED固化创新,让产线变得更丝滑
Analysis of global and Chinese shipbuilding market in 2021: the global shipbuilding new orders reached 119.85 million dwt, with China, Japan and South Korea accounting for 96.58%[figure]
redis String类型常见命令
MySQL development considerations (Alibaba development manual)
Understanding of dart typedef
【架构优化过程思考】如何构建技术方案影响的评估能力
What is reflection-- The soul of frame design
Project training of Software College of Shandong University rendering engine system basic renderer (VII)
Escape rules and examples of go
办公室VR黄片,骚操作!微软HoloLens之父辞职!
Golang collaboration scheduling (I): Collaboration Status
【周赛复盘】LeetCode第80场双周赛
聊聊事件监听那些事-上