Commit Graph

640 Commits

Author SHA1 Message Date
Andrey Lushnikov
0db6165d73 [api] Implement page.authenticate method (#729)
This patch implements `page.authenticate` which should cover all
cases of HTTP authentication.

Fixes #426.
2017-09-11 16:32:13 -07:00
Andrey Lushnikov
0bea42bd8c Do not leave dangling promises when sending messages over protocol (#742)
It's very bad to have 'unhandled promise rejection' that can't be
handled in user code. These errors will exit node process in a near
future.

This patch avoids 'unhandled promise rejection' while sending protocol
messages.

This patch:
- introduces `puppeteer:error` debug scope and starts using it for all
  swalloed errors.
- makes sure that every `client.send` method is either awaited or its
  errors are handled.
- starts return promises from Request.continue() and Request.abort().
- starts swallow errors from Request.contine() and Request.abort().

The last is the most important part of the patch. Since
`Request.continue()` might try to continue canceled request, we should
disregard the error.

Fixes #627.
2017-09-11 16:21:51 -07:00
Eric Bidelman
f11e09d0d4 resources.md -> readme.md so it renders on /examples (#753)
* resources.md -> index.md so it renders on /examples

* Rename index.md to README.md
2017-09-11 11:41:48 -07:00
Alessio Occhipinti
568b7bd47d Proposal: adding RESOURCES.md for examples (#743)
* Create RESOURCES.md

* Update RESOURCES.md
2017-09-11 11:34:06 -07:00
Eric Bidelman
30541cc087 block-images example: use reuters.com (#747)
Due to https://github.com/GoogleChrome/puppeteer/issues/746. The screenshot news.google.com isn't "full page", so that may be confusing to folks.
2017-09-11 10:16:57 -07:00
Andrey Lushnikov
c4a3d44221 Roll chromium to r499413 (#731)
The new chromium:
- supports executionContextId in Runtime.callFunctionOn protocol method
- supports passing objects as arguments in Runtime.callFuntionOn
  protocol method

This roll also fixes #487.
2017-09-09 09:48:09 -07:00
Andrey Lushnikov
d791583ae5 [tests] Skip flaky test (#730)
Reference #673
2017-09-08 23:42:06 -07:00
Andrey Lushnikov
b8bb80a089 support npm proxy configuration for the installation script (#692)
This patch starts supporting NPM proxy configuration in the installation script.
If both NPM proxy and environment proxy are set, NPM proxy settings are preferred.

Fixes #648
2017-09-08 23:37:22 -07:00
Eric Bidelman
8d2a427eee Docker example (#721) 2017-09-08 15:25:43 -07:00
Andrey Lushnikov
113bdafbf0 Bump version to 0.11.0-alpha 2017-09-08 13:37:47 -07:00
Eric Bidelman
272fb4d993 block-images example: switch from bbc to news.google.com (#708) 2017-09-07 12:35:52 -07:00
Eric Bidelman
d2d951d74a Better issue template (#712) 2017-09-07 12:34:52 -07:00
Eric Bidelman
eb862532f1 Issue template (#710)
* Issue template

* Update issue_template.md
2017-09-07 11:24:49 -07:00
Andrey Lushnikov
e12ce802cd Output path as chromium gets successfully downloaded (#689)
Fixes #679.
2017-09-05 18:41:21 -07:00
Eric Bidelman
51a507b236 readme: add PUPPETEER_SKIP_CHROMIUM_DOWNLOAD note (#671) 2017-09-05 11:14:58 -07:00
Andrey Lushnikov
2817130fe0 Mark version 0.10.2 2017-09-01 21:02:08 -07:00
Andrey Lushnikov
9d0ad79b47 fail installation when puppeteer errors downloading chromium (#654)
This patch starts failing npm installation when puppeteer errors downloading chromium.
2017-09-01 20:59:28 -07:00
JoelEinbinder
64124df62f [api] add touchScreen.tap (#639)
This patch:
- adds `page.touchscreen` namespace, similar to `page.mouse` and `page.keyboard`.
- adds tapping to multiple layers:
  - `page.touchscreen.tap`
  - `page.tap` - convenience method which accepts selector
  - `elementHandle.tap`

Fixes #568 and #569.
2017-09-01 19:03:51 -07:00
Abdulaziz Homaily
e95fb96279 Throw an error when Chromium download is failed (#619)
This patch teaches ChromiumDownloader to throw an error if
downloading failed.
2017-09-01 09:47:57 -07:00
JoelEinbinder
42fa3af659 Remove promise jsdoc (#641)
This patch removes unnecessary "promise" return types in jsdoc for async functions.
2017-08-31 17:58:07 -07:00
Andrey Lushnikov
62ececb1c7 Implement page.$eval (#638)
This patch:
- implements page.$eval and frame.$eval
- drops elementHandle.attribute() method in favor of the page.$eval

References #625
2017-08-31 15:38:01 -07:00
Andrey Lushnikov
bf66696770 correct license to be a valid SPDX license expression 2017-08-31 11:16:28 -07:00
Gregory Linford
a052cdb464 Update package.json with Apache License 2.0 (#632)
The license used is Apache License 2.0, so I think it makes sense to update the package.json file with the correct string as a some software use this field to approve or not packages.
2017-08-31 09:57:29 -07:00
Lucas Hill
ce01e84381 [doc] Clarify networkIdleInflight default in docs. (#630) 2017-08-30 23:08:46 -07:00
Andrey Lushnikov
9d7929cd36 Add environment variable to skip download (#606)
This patch:
- starts skipping chromium download if `PUPPETEER_SKIP_CHROMIUM_DOWNLOAD` env variable is set
- adds description of support env variables to the `docs/api.md`.

References #603
2017-08-30 21:40:15 -07:00
Paul Irish
3365562b2b Add DEBUG=* debugging guide to readme (#622) 2017-08-30 18:41:45 -04:00
Andrey Lushnikov
66676c0235 Kill child process group (#621) 2017-08-30 14:16:03 -07:00
Andrey Lushnikov
223a1066bb Drop deasync: this is a left-over from phantomShim (#607) 2017-08-29 23:34:00 -07:00
Andrey Lushnikov
c9b0a6c060 Fix launcher to not leak event listeners (#605)
This patch fixes launcher to not leak event listeners.
2017-08-29 22:49:50 -07:00
Andrey Lushnikov
11ce8b249f Implement Request.resourceType getter (#590)
This patch plumbs `resourceType` parameter of RequestWillBeSent
and requestIntercepted methods.
2017-08-29 16:27:59 -07:00
JoelEinbinder
8f74cc8a90 [api] Add "step" option to mouse.move method (#601)
This patch adds "step" option to the mouse.move method, that optionally tweens mouse movement over multiple steps.

References #423.
2017-08-29 14:13:38 -07:00
Batiste Bieler
77600c6c5e Implement ElementHandle.attribute() method (#543)
This patch implements ElementHandle.attribute() method to fetch a value of
element's attribute.
2017-08-29 11:24:32 -07:00
Andrey Lushnikov
74c53f3758 Roll chromium to r497674 (#588) 2017-08-28 22:19:07 -07:00
Andrey Lushnikov
8f66f7339e Fix launcher in case of empty arguments (#582)
The regression was introduced in
d5327e6a0f
2017-08-28 14:59:41 -07:00
JoelEinbinder
d5327e6a0f [api] Allow a custom userDataDir to be specified (#555)
This patch adds a `userDataDir` option to the `puppeteer.launch()` method.

Fixes #411.
2017-08-28 12:14:20 -07:00
Andrey Lushnikov
66912a7277 [api] use object instead of map for headers (#567)
This patch:

- switches to objects instead of maps for headers (in Request, Response and
page.setExtraHTTPHeaders)
- converts all header names to lower case

Fixes #547, fixes #509
2017-08-28 12:09:24 -07:00
Andrey Lushnikov
39b9081747 Bump version to 0.10.2-alpha (#566) 2017-08-28 11:15:11 -07:00
Lukasz Szóstek
59fc757ee0 [docs] a mistake in allowed values of page.evaluateMedia (#580) 2017-08-28 10:37:38 -07:00
Eric Bidelman
f9abc8ea03 readme: move up note about Page.pdf working on headless only (#577)
Hard to find. From https://github.com/GoogleChrome/puppeteer/issues/576
2017-08-28 10:31:35 -07:00
Andrey Lushnikov
da85b4466e [docs] Add CentOS troubleshooting notes (#579) 2017-08-28 10:21:54 -07:00
Mohamed Oun
225e880d15 doc: Clarify that examples need Node v8 (#559)
The examples use async/await, but Node v6 doesn't support them, so to use these examples you either need Node 8 or a transpiler (like Babel) or to use promises.
2017-08-27 14:08:25 -07:00
Andrey Lushnikov
e921a1cc21 Fix Request Interception (#565)
It turned out that either Network.requestIntercepted or
Network.requestWillBeSent occasionally report encoded URL.

This patch starts decoding URL's when generating request hash.

Fixes #558.
2017-08-27 12:41:09 -07:00
Andrey Lushnikov
ea4f8d78fc Mark version 0.10.1 2017-08-25 19:37:53 -07:00
JoelEinbinder
cd81944e66 Test node6 on travis (#551)
This patch starts running all puppeteer tests with node6 on travis-ci.
2017-08-25 19:28:49 -07:00
JoelEinbinder
bd5b4fe963 Phantom shim mention (#552)
Remote remaining mentions of PhantomShim
2017-08-25 16:30:48 -07:00
Andrey Lushnikov
e8f8a1ad1f Kill PhantomShim. (#533)
This patch kills PhantomShim, a lightweight layer that helped to
bootstrap Puppeteer API.

At this point, PhantomShim:
- passes 139 phantomJS tests
- fails 13 tests
- lacks capabilities to run 26

The failings and unsupported tests don't have any value for Puppeteer
API, so it doesn't make sense to maintain PhantomShim any longer.
2017-08-25 15:15:34 -07:00
JoelEinbinder
2c4dfbfd88 Fix node6 support for Object.entries and URL object (#548)
This patch introduces a polyfill for Object.entries which is missing in Node 6
2017-08-25 15:13:59 -07:00
Eric Bidelman
4e3b6a1f57 Example: add listen for custom event on page load (#529)
* Example: add listen for custom event on page load

* correct pptr path
2017-08-24 23:33:31 -07:00
Andrey Lushnikov
be4da580d4 Bump tip-of-tree version to 0.10.1-alpha (#534)
This patch:
- bumps tip-of-tree version to 0.10.1-alpha
- updates api.md to refer to released API and fix a nit in README.md
2017-08-24 22:47:57 -07:00
Andrey Lushnikov
751164c69f Mark version 0.10.0 2017-08-24 18:11:43 -07:00