底层的浏览器自动化框架 Remote Browser

码农软件 · 软件分类 · 程序调试工具 · 2019-11-29 17:58:31

软件介绍

Remote Browser 基于 Web Extensions API 标准构建,是一个使用 JavaScript 以编程方式控制诸如 Chrome 和 Firefox 之类的网络浏览器的库。此前你可能已经听说过类似的浏览器自动化框架,例如 Puppeteer 和 Selenium。

Remote Browser 与这些框架非常相似,它可用于完成与 UI 测试、服务器端渲染(SSR)以及网页抓取相关的各种任务。但不同之处在于它使用标准的跨浏览器兼容技术构建,其主要目标是促进与现有 API 的交互,而不是创建自己新的 API。

下面这段示例代码的作用是导航至选项卡并使用 Remote Browser 进行截图

import Browser from 'remote-browser';
(async () => {
  // Create and launch a new browser instance.
  const browser = new Browser();
  await browser.launch();
  // Directly access the Web Extensions API from a remote client.
  const tab = await browser.tabs.create({ url: 'https://intoli.com' });
  const screenshot = await browser.tabs.captureVisibleTab();
})();

本文地址:https://codercto.com/soft/d/20068.html

REST in Practice

REST in Practice

Jim Webber、Savas Parastatidis、Ian Robinson / O'Reilly Media / 2010-9-24 / USD 44.99

Why don't typical enterprise projects go as smoothly as projects you develop for the Web? Does the REST architectural style really present a viable alternative for building distributed systems and ent......一起来看看 《REST in Practice》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器