Commit Graph

3577 Commits

Author SHA1 Message Date
Paul Irish
a93377fc22 readme: migrate from travis-ci .com to .org (#297) 2017-08-16 12:51:41 -07:00
edgar c
3cc5ba4a6f update code example: setRequestInterceptionEnabled (#294) 2017-08-16 11:19:13 -07:00
Jonathan Garbee
da53218107 Fix doc on pdf method. Minor addition to PDF path option docs. (#292) 2017-08-16 11:11:40 -07:00
Paul Irish
92e64e2354 docs: recommendation of canary if Chrome is preferred (#293) 2017-08-16 11:09:18 -07:00
Andrey Lushnikov
3ce173c16b Roll chromium to r494755 (#286)
Fixes #285.
2017-08-16 07:21:26 -07:00
Andrey Lushnikov
0a190ebec9 Rename 'remoteDebuggingURL' into 'browserWSEndpoint' (#272) 2017-08-16 01:10:55 -07:00
Andrey Lushnikov
44c15220f9 Rename ElementHandle.release into ElementHandle.dispose (#284)
The ElementHandle.release feels related to ElementHandle.click.
The dispose is a more clear name.
2017-08-16 00:49:20 -07:00
JoelEinbinder
3c2aaaaeb0 Readme fixup part 1 (#278) 2017-08-15 23:04:16 -07:00
Paul Irish
6a1fb26196 Add .npmignore (#282) 2017-08-15 22:30:56 -07:00
Pavel Feldman
9c5c38e49a Roll chromium to r494685 (#281) 2017-08-15 22:10:08 -07:00
Ken
a06d2618bf readme: minor updates (#277)
- update links to puppeteer.launch() section of API
- minor fine-tuning of verbiage and small typo
2017-08-15 18:55:20 -07:00
Paul Irish
0a5f7258fd docs: add FAQ entry (#276) 2017-08-15 18:08:19 -07:00
Eric Bidelman
4c12d3a635 readme: npm badge (#273) 2017-08-15 17:37:55 -07:00
Aleksey
56eab00fa7 Roll chromium to r494365 (#271)
This patch:
- rolls chromium to r494365
- starts using Runtime.evaluate(awaitPromise: true), with new semantic
  we can avoid additional Runtime.awaitPromise call
- stops resolving promises for Console event
2017-08-15 17:35:59 -07:00
Andrey Lushnikov
1e5d9fd8c0 Proofreading documentation (#274)
This patch fixes documentation in a few places.
2017-08-15 17:33:03 -07:00
Andrey Lushnikov
af89e893e7 Implement basic element handles (#248)
This patch implements basic element handles which a backed with remote objects.

Fixes #111
2017-08-15 14:54:02 -07:00
Andrey Lushnikov
a424f5613a Introduce Puppeteer.connect method (#264)
This patch:
- refactors Connection to use a single remote debugging URL instead of a
  pair of port and browserTargetId
- introduces Puppeteer.connect() method to attach to already running
  browser instance.

Fixes #238.
2017-08-15 14:29:42 -07:00
Andrey Lushnikov
96309a207c Fix request interception corner cases (#261)
This patch:
- teaches request interception to ignore data URLs. Currently protocol
  doesn't send interceptions for data URLs.
- teaches request interception to properly process URLs with hashes.
  Currently `Network.requestIntercepted` sends url with a hash, whereas
  `Network.requestWillBeSent` doesn't report hashes in its urls. @see
  crbug.com/755456
- skips one more header that I spotted during debugging interception on
  the realworld websites.

Fixes #258, #259.
2017-08-15 13:55:48 -07:00
Paul Irish
1d2ae60e0d readme: new new temp logo (#267) 2017-08-15 11:49:26 -07:00
Andrey Lushnikov
24764df4c4 Emit 'error' event when page crashes (#266)
This patch starts emitting 'error' event when page crashes.
'error' events have special treatment in node, so page crashes
become observable for users.

Fixes #262.
2017-08-15 11:13:05 -07:00
Andrey Lushnikov
cd54e5fb11 README: fix example 2017-08-15 10:12:55 -07:00
Eric Bidelman
5778b54924 readme: new temp logo (#265) 2017-08-15 10:08:32 -07:00
Eric Bidelman
124ca2b855 readme: bye bye sweet logo 2017-08-15 09:02:28 -07:00
JoelEinbinder
59256ee5ba Capitalize Chromium and Puppeteer (#263) 2017-08-15 00:14:12 -07:00
Andrey Lushnikov
fd325cd48c Add note about executablePath option to puppeteer.launch (#260) 2017-08-14 23:57:12 -07:00
Andrey Lushnikov
0a1294c7ee general cleanup (#256)
This patch:
- fixes multimap implementation to work properly in node
- moves ESTreeWalker from third-party into utils/doclint. ESTreeWalker
  license is compliant with Apache2.0.
2017-08-14 21:16:59 -07:00
Andrey Lushnikov
13e8580a34 Use puppeteer.launch instead of browser constructor (#255)
This patch:
- split browser launching logic from Browser into `lib/Launcher.js`
- introduce `puppeteer` namespace which currently has a single `launch`
  method to start a browser

With this patch, the browser is no longer created with the `new
Browser(..)` command. Instead, it should be "launched" via the
`puppeteer.launch` method:

```js
const puppeteer = require('puppeteer');
puppeteer.launch().then(async browser => {
  ...
});
```

With this approach browser instance lifetime matches the lifetime of
actual browser process. This helps us:
- remove proxy streams, e.g. browser.stderr and browser.stdout
- cleanup browser class and make it possible to connect to remote
  browser
- introduce events on the browser instance, e.g. 'page' event. In case
  of lazy-launching browser, we should've launch browser when an event
  listener is added, which is unneded comlpexity.
2017-08-14 18:08:06 -07:00
Eric Bidelman
0a3dd4e727 readme: faq entries (#254)
* readme: faq entries

* Feedback
2017-08-14 17:55:40 -07:00
Andrey Lushnikov
5154d72342 Add separate README.md to phantom_shim (#252)
The PhantomShim specific readme should be a better explanation of
what phantom shim is and is not.
2017-08-14 10:13:48 -07:00
Andrey Lushnikov
13e0965407 Move emulation documentation under page.emulate method. (#253) 2017-08-13 00:47:01 -07:00
Andrey Lushnikov
4269f6a1bb Roll chromium to r493985 (#251)
This patch:
- rolls chromium to r493985
- migrates Browser.version() puppeteer method to use newly added
  Browser.getVersion() protocol method

References #227
2017-08-12 22:04:39 -07:00
Andrey Lushnikov
3ee4951506 [DEBUG] add "session" namespace to trace target protocol messages (#249) 2017-08-11 17:47:33 -07:00
Jonathan Garbee
56b0d8722b Default value for property on dialog (#247) 2017-08-11 17:24:46 -07:00
Andrey Lushnikov
4551afc6dc Introduce new interception API (#242)
This patch introduces new interception API, via killing InterceptedRequest and giving the `abort` and `continue` methods to the Request object.
2017-08-11 17:24:31 -07:00
JoelEinbinder
d793e51a9a Add a test that uses Modernizr to detect touch (#245)
Add a test that uses Modernizr to detect touch
2017-08-11 13:59:23 -07:00
Andrey Lushnikov
dbac6788ae Plumb default prompt value to the dialog (#243)
This patch:
- plumbs default prompt value to the dialog
- enables one more phantom test
2017-08-11 12:17:43 -07:00
JoelEinbinder
53baed6af6 Google search example (#220)
Add google search example.

References #178
2017-08-11 01:41:42 -07:00
JoelEinbinder
497baf0198 Roll chromium to r493673 (#240)
Mouse events are no longer racy. Enabling touch no longer converts all mouse events into touches. Promises in destroyed execution contexts are rejected immediately.
2017-08-11 01:21:02 -07:00
Andrey Lushnikov
b8dbd28b8c Refer to the upstream bug (#239)
The issue #168 is a protocol inconsistency which happens only
in case of HTTPS error. This patch starts refering to the
upstream bug instead of puppeteer issue.

Closes #168.
2017-08-11 01:07:33 -07:00
Andrey Lushnikov
6347a049ba Rename Page.setInPageCallback into Page.addBinding (#236)
This seems to be a much better name which is actually used for a similar
purposes in chromium/v8.
2017-08-10 21:44:49 -07:00
Andrey Lushnikov
25465525c1 Fix full page screenshot example (#237)
This patch aligns the example with our style in `examples/` folder, and also starts to use page.goto instead of page.navigate
2017-08-10 21:44:27 -07:00
Pavel Feldman
3a7741a172 Introduce page.emulate convenience wrapper (#231)
This patch:
- introduces Page.emulate convenience wrapper
- adds a screenshot-fullPage.js example
2017-08-10 18:42:30 -07:00
Andrey Lushnikov
7936be43f7 Update README.md
Remove typo in link description.
2017-08-10 18:36:02 -07:00
Eric Bidelman
1ee47d868b Doc polish. Example consistency (#233) 2017-08-10 18:31:54 -07:00
JoelEinbinder
0a55345060 Test touch emulation more completely (#235) 2017-08-10 18:25:56 -07:00
Eric Bidelman
8ccd10bfa2 Docs: add default networkIdleTimeout value (#234) 2017-08-10 14:49:34 -07:00
Andrey Lushnikov
e1d8a3781e Rename Page.navigate into Page.goto (#232)
Fixes #228.
2017-08-10 00:02:10 -07:00
Andrey Lushnikov
fe06c896eb Roll chromium to 492629 (#230)
This patch
- rolls chromium to 492629
- migrates connection establishing to use browser target. This migration means
  that now we have a single websocket connection to browser (implemented
  in Connection class). A connection to a particular target is
  incapsulated in a new Session class.
2017-08-09 16:14:00 -07:00
Andrey Lushnikov
29adc5dc80 [examples] get rid of old examples
This patch:
- removes old phantom-js examples
- adds an example to load page without images

References #178
2017-08-08 00:44:15 -07:00
JoelEinbinder
104455c75a Remove unrandomize example (#221) 2017-08-07 23:50:25 -07:00