📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP

playwright-core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
p

playwright-core

A high-level API to automate web browsers

1.52.0
latest
87

Supply Chain Security

100

Vulnerability

77

Quality

99

Maintenance

100

License

Network access

Supply chain risk

This module accesses the network.

Found 7 instances in 1 package

Uses eval

Supply chain risk

Package uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.

Found 1 instance in 1 package

Shell access

Supply chain risk

This module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.

Found 1 instance in 1 package

Version published
Weekly downloads
12M
-46.45%
Maintainers
4
Weekly downloads
 
Created
Issues
812

What is playwright-core?

The playwright-core npm package is a library that provides a high-level API to control headless Chrome, Firefox, and WebKit with a single API. It is designed for automating web browser interactions for the purposes of web scraping, automated testing, and web automation.

What are playwright-core's main functionalities?

Browser Automation

Automate browser actions such as opening pages, clicking on elements, and navigating websites.

const { chromium } = require('playwright-core');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  // other actions...
  await browser.close();
})();

Web Scraping

Extract data from web pages by navigating to them and retrieving the content.

const { firefox } = require('playwright-core');

(async () => {
  const browser = await firefox.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  const data = await page.content();
  // process data...
  await browser.close();
})();

Automated Testing

Perform automated tests on web applications by simulating user interactions and verifying page content.

const { webkit } = require('playwright-core');

(async () => {
  const browser = await webkit.launch();
  const page = await browser.newPage();
  await page.goto('https://example.com');
  const title = await page.title();
  console.assert(title === 'Expected Page Title');
  await browser.close();
})();

Other packages similar to playwright-core

FAQs

Package last updated on 17 Apr 2025

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