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

@playwright/browser-chromium

Package Overview
Dependencies
Maintainers
4
Versions
688
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@playwright/browser-chromium

Playwright package that automatically installs Chromium

  • 1.48.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is @playwright/browser-chromium?

@playwright/browser-chromium is a Node.js library that provides a high-level API to automate Chromium-based browsers. It is part of the Playwright project, which is designed for end-to-end testing and web scraping. The package allows you to control a Chromium browser programmatically, enabling tasks such as automated testing, web scraping, and browser automation.

What are @playwright/browser-chromium's main functionalities?

Browser Automation

This feature allows you to automate browser actions such as navigating to a URL, taking screenshots, and closing the browser.

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

Web Scraping

This feature enables you to scrape web content by navigating to a webpage and extracting its HTML content.

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

Automated Testing

This feature is useful for automated testing, allowing you to verify that web pages behave as expected.

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

Other packages similar to @playwright/browser-chromium

FAQs

Package last updated on 25 Oct 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