Go to file
Andrey Lushnikov 2de672ed1b Introduce Page.injectFile method
With this patch, page has two methods to include javascript:
- Page.addScriptTag(url) which is similar to phantom's includeJs.
- Page.injectFile(filePath) which is similar to phantom's injectJs.
2017-05-12 10:19:01 -07:00
examples Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
lib Introduce Page.injectFile method 2017-05-12 10:19:01 -07:00
phantomjs Introduce Page.injectFile method 2017-05-12 10:19:01 -07:00
third_party/phantomjs Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
.gitignore Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
CONTRIBUTING.md Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
index.js Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
install.js Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
LICENSE Initial commit 2017-05-09 15:16:13 -07:00
package.json Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00
README.md Puppeteer: staging commit. 2017-05-11 00:06:41 -07:00

Status

Test results on Mac OS X in headless mode:

  111 passed
   20 failed as expected
    1 skipped
   49 unsupported

Installing

npm i
npm link # this adds puppeteer to $PATH

Run

# run phantomjs script
puppeteer third_party/phantomjs/examples/colorwheel.js

# run 'headful'
puppeteer --no-headless third_party/phantomjs/examples/colorwheel.js

# run puppeteer example
node examples/screenshot.js

Tests

Run phantom.js tests using puppeteer:

./third_party/phantomjs/test/run-tests.py