Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

chromium-bidi

Package Overview
Dependencies
Maintainers
2
Versions
72
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

chromium-bidi

An implementation of the WebDriver BiDi protocol for Chromium implemented as a JavaScript layer translating between BiDi and CDP, running inside a Chrome tab.

  • 0.7.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.9M
decreased by-52.72%
Maintainers
2
Weekly downloads
 
Created

What is chromium-bidi?

The chromium-bidi npm package provides a BiDi (Bidirectional) protocol implementation for Chromium-based browsers. It allows for remote control of the browser, enabling automation and interaction with web pages through a standardized protocol.

What are chromium-bidi's main functionalities?

Browser Control

This feature allows you to launch a Chromium browser, navigate to a webpage, and interact with it. The code sample demonstrates launching the browser, opening a new page, navigating to 'https://example.com', printing the page title, and closing the browser.

const { chromiumBidi } = require('chromium-bidi');
(async () => {
  const browser = await chromiumBidi.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  console.log(await page.title());
  await browser.close();
})();

Element Interaction

This feature allows you to interact with elements on a webpage. The code sample demonstrates launching the browser, opening a new page, navigating to 'https://example.com', selecting an 'h1' element, printing its text content, and closing the browser.

const { chromiumBidi } = require('chromium-bidi');
(async () => {
  const browser = await chromiumBidi.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  const element = await page.$('h1');
  console.log(await element.textContent());
  await browser.close();
})();

Screenshot Capture

This feature allows you to capture screenshots of web pages. The code sample demonstrates launching the browser, opening a new page, navigating to 'https://example.com', capturing a screenshot, and saving it as 'example.png'.

const { chromiumBidi } = require('chromium-bidi');
(async () => {
  const browser = await chromiumBidi.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  await page.screenshot({ path: 'example.png' });
  await browser.close();
})();

Other packages similar to chromium-bidi

FAQs

Package last updated on 05 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc