zombieteer
v1.3.0
Published
a convenience wrapper for pupperteer.js
Downloads
11
Readme
zombieteer
A simple wrapper for puppeteer.js that lets a running chrome browser to be controlled by scripts
features
- keeps an opened browser
- exposes a repl for controlling the browser
installation
npm install -g zombieteer
If you already have chrome installed, and want to avoid downloading another version, try:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=1 npm install -g zombieteer
then run with zombieteer --new --bin=/path/to/chrome
note: the argument to bin must be the chrome binary itself, not a directory You only need to specify --bin once. If you want to change it, add --save-bin
usage
zombieteer path/to/script.js script.js must export a function of type:
function({
browser, /*: puppeteer.Browser */
currentPage, /*: () => puppeteer.Page */
repl, /*: () => void */
})
running an example (see example/ dir)
- cd example/
- ./run-php-server.sh
- zombieteer --new # opens a new browser, do only once
- zombieteer submit-form.js # separate terminal