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

playwright

Package Overview
Dependencies
Maintainers
5
Versions
4744
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

playwright - npm Package Compare versions

Comparing version 0.11.1-next.1584577781703 to 0.11.1-next.1584644386005

16

index.js

@@ -16,9 +16,19 @@ /**

*/
const path = require('path');
const {Playwright} = require('playwright-core/lib/server/playwright.js');
module.exports = new Playwright({
downloadPath: __dirname,
const playwright = new Playwright({
browsers: ['webkit', 'chromium', 'firefox'],
respectEnvironmentVariables: true,
});
module.exports = playwright;
try {
const downloadedBrowsers = require(path.join(__dirname, '.downloaded-browsers.json'));
playwright.chromium._executablePath = downloadedBrowsers.crExecutablePath;
playwright.firefox._executablePath = downloadedBrowsers.ffExecutablePath;
playwright.webkit._executablePath = downloadedBrowsers.wkExecutablePath;
} catch (e) {
throw new Error('ERROR: Playwright did not download browsers');
}

13

install.js

@@ -16,8 +16,11 @@ /**

*/
const {downloadBrowser} = require('playwright-core/download-browser');
const playwright = require('.');
const path = require('path');
const fs = require('fs');
const {downloadBrowserWithProgressBar} = require('playwright-core/download-browser');
(async function() {
await downloadBrowser(playwright.chromium);
await downloadBrowser(playwright.firefox);
await downloadBrowser(playwright.webkit);
const crExecutablePath = await downloadBrowserWithProgressBar(path.join(__dirname, '.local-browsers', 'chromium'), 'chromium');
const ffExecutablePath = await downloadBrowserWithProgressBar(path.join(__dirname, '.local-browsers', 'firefox'), 'firefox');
const wkExecutablePath = await downloadBrowserWithProgressBar(path.join(__dirname, '.local-browsers', 'webkit'), 'webkit');
await fs.promises.writeFile(path.join(__dirname, '.downloaded-browsers.json'), JSON.stringify({crExecutablePath, ffExecutablePath, wkExecutablePath, }));
})();
{
"name": "playwright",
"version": "0.11.1-next.1584577781703",
"version": "0.11.1-next.1584644386005",
"description": "A high-level API to automate web browsers",

@@ -15,4 +15,4 @@ "repository": "github:Microsoft/playwright",

"dependencies": {
"playwright-core": "=0.11.1-next.1584577781703"
"playwright-core": "=0.11.1-next.1584644386005"
}
}
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