0
0
mirror of https://github.com/puppeteer/puppeteer synced 2024-06-14 14:02:48 +00:00
Commit Graph

4614 Commits

Author SHA1 Message Date
Aleksey
56eab00fa7 Roll chromium to r494365 ()
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 ()
This patch fixes documentation in a few places.
2017-08-15 17:33:03 -07:00
Andrey Lushnikov
af89e893e7 Implement basic element handles ()
This patch implements basic element handles which a backed with remote objects.

Fixes 
2017-08-15 14:54:02 -07:00
Andrey Lushnikov
a424f5613a Introduce Puppeteer.connect method ()
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 .
2017-08-15 14:29:42 -07:00
Andrey Lushnikov
96309a207c Fix request interception corner cases ()
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 , .
2017-08-15 13:55:48 -07:00
Paul Irish
1d2ae60e0d readme: new new temp logo () 2017-08-15 11:49:26 -07:00
Andrey Lushnikov
24764df4c4 Emit 'error' event when page crashes ()
This patch starts emitting 'error' event when page crashes.
'error' events have special treatment in node, so page crashes
become observable for users.

Fixes .
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 () 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 () 2017-08-15 00:14:12 -07:00
Andrey Lushnikov
fd325cd48c Add note about executablePath option to puppeteer.launch () 2017-08-14 23:57:12 -07:00
Andrey Lushnikov
0a1294c7ee general cleanup ()
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 ()
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 ()
* readme: faq entries

* Feedback
2017-08-14 17:55:40 -07:00
Andrey Lushnikov
5154d72342 Add separate README.md to phantom_shim ()
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. () 2017-08-13 00:47:01 -07:00
Andrey Lushnikov
4269f6a1bb Roll chromium to r493985 ()
This patch:
- rolls chromium to r493985
- migrates Browser.version() puppeteer method to use newly added
  Browser.getVersion() protocol method

References 
2017-08-12 22:04:39 -07:00
Andrey Lushnikov
3ee4951506 [DEBUG] add "session" namespace to trace target protocol messages () 2017-08-11 17:47:33 -07:00
Jonathan Garbee
56b0d8722b Default value for property on dialog () 2017-08-11 17:24:46 -07:00
Andrey Lushnikov
4551afc6dc Introduce new interception API ()
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 ()
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 ()
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 ()
Add google search example.

References 
2017-08-11 01:41:42 -07:00
JoelEinbinder
497baf0198 Roll chromium to r493673 ()
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 ()
The issue  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 .
2017-08-11 01:07:33 -07:00
Andrey Lushnikov
6347a049ba Rename Page.setInPageCallback into Page.addBinding ()
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 ()
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 ()
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 () 2017-08-10 18:31:54 -07:00
JoelEinbinder
0a55345060 Test touch emulation more completely () 2017-08-10 18:25:56 -07:00
Eric Bidelman
8ccd10bfa2 Docs: add default networkIdleTimeout value () 2017-08-10 14:49:34 -07:00
Andrey Lushnikov
e1d8a3781e Rename Page.navigate into Page.goto ()
Fixes .
2017-08-10 00:02:10 -07:00
Andrey Lushnikov
fe06c896eb Roll chromium to 492629 ()
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 
2017-08-08 00:44:15 -07:00
JoelEinbinder
104455c75a Remove unrandomize example () 2017-08-07 23:50:25 -07:00
Andrey Lushnikov
34b0095c10 Make interception work with redirects ()
This patch:
- changes interception API so that it better aligns with what we'd like to see
  in 
- fixes the issue with redirect interception

Fixes .
2017-08-07 17:48:52 -07:00
Andrey Lushnikov
e1c5b8d244 Aborted network requests should use protocol's "Failed" status ()
This patch starts using "Failed" command for request interception instead of
"Aborted".

The "Aborted" status also has a side-effect of cancelling the navigation, so
there will be no error on the page and form puppeteer's standpoint, the navigation
will never complete.
2017-08-07 15:13:17 -07:00
Andrey Lushnikov
4eedc10cfa Add pdf.js example ()
add pdf.js example
2017-08-07 14:55:45 -07:00
Andrey Lushnikov
4f5cad921e [doc] Remove mention of broken javascript dialogs from api.md () 2017-08-04 01:12:18 -07:00
Andrey Lushnikov
7888a37a3d Page.pdf should accept case-insensetive page format () 2017-08-04 01:01:10 -07:00
Andrey Lushnikov
00196e6cdc Fix setContent to actually await the inner evaluation () 2017-08-04 00:23:04 -07:00
Andrey Lushnikov
af2b790227 Add test to reproduce handing touch events ()
References .
2017-08-03 22:51:51 -07:00
Andrey Lushnikov
13327f3303 Add test which reproduces the hanging mouse.click() behavior ()
This patch adds a disabled test to reproduce the mouse.click() hanging
bug.

References .
2017-08-03 22:10:06 -07:00
Andrey Lushnikov
2d650d0301 Introduce CHROME env variable for tests ()
This patch adds `CHROME` env variable which allows to
specify custom executable path to run tests.
2017-08-03 21:38:55 -07:00
Andrey Lushnikov
a4c0d58204 Fix tests in non-headless mode ()
The chrome-devtools://devtools/bundled/inspector.html is a perfectly
valid url in headful chromium, so we should pick another one for test
to work (and for the navigation inside the test to fail).
2017-08-03 19:11:41 -07:00
Pavel Feldman
82fbb268db Do not count inflight requests explicitly - use set. () 2017-08-03 16:30:55 -07:00
Andrey Lushnikov
20ba447689 [DEBUG] Trace only those events which have listeners. ()
The `DEBUG=*page npm run unit` is too verbose due to events spamming
the console.

This patch starts tracing emitted events only if there are any
listeners.
2017-08-03 15:20:31 -07:00
Andrey Lushnikov
d8dd6ea140 Add more tests to cover Page.pdf() method () ()
This patch adds sanity tests to make sure Page.pdf() produces
sane results.

Fixes .
2017-08-03 14:10:52 -07:00