mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
2de672ed1b7c09a47481f5180716f00078eac194
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.
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
Description
Languages
TypeScript
93.2%
JavaScript
5.1%
HTML
1.2%
CSS
0.3%
MDX
0.1%