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.1583306456276 to 0.11.1-next.1583349510791

4

package.json
{
"name": "playwright",
"version": "0.11.1-next.1583306456276",
"version": "0.11.1-next.1583349510791",
"description": "A high-level API to automate web browsers",

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

"dependencies": {
"playwright-core": "=0.11.1-next.1583306456276"
"playwright-core": "=0.11.1-next.1583349510791"
}
}

@@ -77,27 +77,4 @@ # Playwright

And here is the same script for Chrome on Android.
#### Evaluate in browser context
```js
const { chromium, devices } = require('playwright');
const pixel2 = devices['Pixel 2'];
(async () => {
const browser = await chromium.launch();
const context = await browser.newContext({
viewport: pixel2.viewport,
userAgent: pixel2.userAgent,
geolocation: { longitude: 12.492507, latitude: 41.889938 },
permissions: { 'https://www.google.com': ['geolocation'] }
});
const page = await context.newPage();
await page.goto('https://maps.google.com');
await page.click('text="Your location"');
await page.waitForRequest(/.*pwa\/net.js.*/);
await page.screenshot({ path: 'colosseum-android.png' });
await browser.close();
})();
```
#### Evaluate script
This code snippet navigates to example.com in Firefox, and executes a script in the page context.

@@ -126,2 +103,25 @@

#### Intercept network requests
This code snippet sets up network interception for a WebKit page to log all network requests.
```js
const { webkit } = require('playwright');
(async () => {
const browser = await webkit.launch();
const context = await browser.newContext();
const page = await context.newPage();
// Log and continue all network requests
page.route('**', request => {
console.log(request.url());
request.continue();
});
await page.goto('http://todomvc.com');
await browser.close();
})();
```
## Contributing

@@ -128,0 +128,0 @@

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