Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
scriptwriter
Advanced tools
Learn what Playwright can do in each of the various browsers it supports. By default, Scriptwriter loads Chromium and creates a Chrome Devtools Protocol (CDP) client for more repl fun!
npm i -g playwright
(tested with 1.5.2).npm i -g scriptwriter
.npm link
playwright for scriptwriter's global-import to work).npm link
or npm start
.scriptwriter --no-headless
will launch the repl and Chromium.await
right away: await page.goto('https://github.com')
github.com ~>
.help
lists the global commands.Tab
twice will display autocomplete help.You can use cli flags to set the config scriptwriter --help
:
Usage
$ scriptwriter [--no-headless] [--device <name>] [--config <file>]
[--browser <browser>] [--no-js] [--no-csp]
Options
--no-headless, --no-h Run as headless=false
--device, -d Load a device profile from Playwright
--config, -c Pass a config file to Scriptwriter
--browser, -b Change browsers (default: chromium)
--no-js Disable JavaScript
--no-csp Bypass CSP
--aom, -a Launch with Accessibility Object Model (AOM) enabled
--user, -u Launch with a Persistent Context
Examples
$ scriptwriter
$ scriptwriter --no-headless
$ scriptwriter --device 'iPhone X'
$ scriptwriter --config ./config.js
$ scriptwriter -c ./config.json --no-h
$ scriptwriter --no-js --b firefox
You can also load a config from a file.
// iphonex.json
{
"launch": {
"headless": true,
"args": ["--some-blink-specific-tag-name"]
},
"context": {},
"device": "iPhone X"
}
scriptwriter --config iphonex.json
You can load your own commands. Scriptwriter exposes some helpful utility functions.
Example:
// my-command.js
scriptwriter.completion = '.louder';
director.defineCommand('louder', {
help: `make something louder`,
async action(str) {
const { log, color } = scriptwriter;
log(color.red(`${str.toUpperCase()}!!`));
director.displayPrompt();
},
});
// in the scriptwriter repl
> .load my-command.js
> .louder test
TEST!!
On a mac, you may get the firewall popup.
Keychain Access > Certificate Assistant > Create a Certificate
.Playwright
.Certificate Type
to Code Signing
.create
.Get Info
.Trust
disclosure.When using this certificate:
to Always Trust
.Options > Show in Finder
.New Terminal Here
.pwd
and copy the path.sudo codesign -s Playwright -f <PATH_TO_CHROMIUM> --deep
.FAQs
✍️ An authoring tool for playwrights.
The npm package scriptwriter receives a total of 6 weekly downloads. As such, scriptwriter popularity was classified as not popular.
We found that scriptwriter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.