ℹ️ Please, see the full project documentation here:
https://softvisio-node.github.io/playwright/
Provides set of patches and extensions for playwright
.
You can find original playwright API documentation here.
npm install @softvisio/playwright
It doesn't installs any browsers by default, so if you need chromiun
you need to install it manually:
npx playwright install chromium
import playwright from "@softvisio/playwright";
Patch for the original BrowserType class. Adds following changes:
headless
By default underwindows
headless is set to thefalse
for other platforms to thetrue
.executablePath
By default forlinux
platform is set to the"/usr/bin/google-chrome-stable"
.proxy
By default adds proxy server loopback that bypass all requests. It can be overridden in the browser contexts.
- Returns: {boolean}
true
if browser started in theheadless
mode.
options
{Object} New context options. Below are enumerated only the changes for the original API method:stealth
{boolean} Enables various stealth mode extensions, which helps to hideheadless
mode. Default:true
.proxy
{string|ProxyClient|Object} Added support for {ProxyClient}. If {string} is provided it will be passed to the {ProxyClient} constructor as URL.
- Returns: {boolean}
true
if images is currently disabled.
Sets route
filter, which filters out images requests.
https://httpbin.org/user-agent