Commit Graph

1260 Commits

Author SHA1 Message Date
Joel Einbinder
a4cebd8e6a feat(chromium): roll Chromium to r599821 (#3414)
This roll includes:
 - https://crrev.com/599782 DevTools: force a style recalc before reporting final CSS coverage
 - https://crrev.com/599769 DevTools: Expose more properties through the accessibility protocol

References: #2033
2018-10-16 11:24:31 -07:00
Joel Einbinder
0fd3bfb986 test(CSSCoverage): failing test when a stylesheet was recently added (#3400)
If nobody forces a layout, CSS coverage is inconsistent. This causes some flakes on the bots. The test in this PR fails 90% of the time on my local machine.
2018-10-12 13:49:59 -07:00
Mikhail Shustov
a04dedcaf8 docs(troubleshooting.md): run non-headless on CI (#3353)
Fixes #3303.
2018-10-09 14:25:55 -07:00
Sony AK
0bb462c8f5 docs(readme): clarify SPA and SSR (#3363) 2018-10-09 14:20:49 -07:00
Joel Einbinder
6ac66c3547 feat: browser.waitForTarget (#3356)
This adds `browser.waitForTarget` and `browserContext.waitForTarget`. It also fixes a flaky test that was incorrectly expecting targets to appear instantly.
2018-10-09 14:16:53 -07:00
Joel Einbinder
07febb637c fix: add missing location property to some key descriptors (#3354) 2018-10-05 12:35:10 -07:00
Justin Lee
90d1fe8f6f docs(api): fixed grammatical error (it's -> its) #3352
Fixed incorrect use of "it's".
2018-10-04 16:09:08 -07:00
Andrey Lushnikov
af4209ff98
chore: bump version to v1.9.0-post (#3351) 2018-10-04 14:53:00 -07:00
Andrey Lushnikov
f6c05e6efd
chore: mark version v1.9.0 (#3350) 2018-10-04 14:37:40 -07:00
Andrey Lushnikov
4abf7d1fba
docs(bundling): add docs about bundling for web (#3348) 2018-10-04 14:23:03 -07:00
Andrey Lushnikov
8becb31754
test: add failing test for page.select (#3346)
References #3327.
2018-10-04 10:41:38 -07:00
Andrey Lushnikov
5ebfe1a0dc
docs(contributing): remove the --filter note (#3342)
Fixes #3340
2018-10-03 17:25:20 -07:00
Joel Einbinder
cd54ce388e fix(types): upgrade node types to 8.10.34 (#3341) 2018-10-03 16:59:49 -07:00
Raymond Tan
c9657f8819 docs(api.md): minor grammar and consistency fixes (#3320) 2018-10-02 13:38:41 -07:00
Joel Einbinder
c237947b32 chore(types): upgrade to TypeScript 3.1.1 (#3331)
This upgrades  us to TypeScript 3.1.1, which fixes some build failures. Annoyingly TypeScript does a better job of checking `process.stdio`, which exposes that the DefinitelyTyped definition for it is wrong. See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/11587. I'll look into submitting a patch for that later.
2018-10-02 13:38:06 -07:00
Łukasz Usarz
842fee860b fix(page): full page screenshot when defaultViewport is null (#3306)
Fixes #3104
2018-09-27 10:50:21 -07:00
Andrey Lushnikov
e75e36b9c2
feat(chromium): roll Chromium to r594312 (#3310)
This roll includes:
- https://crrev.com/593256 - Support fetching missing intermediate certificates in headless
- https://crrev.com/594161 - DevTools: allow addScriptToEvaluateOnNewDocument accept optional worldName parameter.

References #2671.
Fixes #2377.
2018-09-26 09:18:56 -07:00
Andrey Lushnikov
85aca8e1a5
chore(testserver): prepare test server (#3294) 2018-09-24 12:46:39 -07:00
Andrey Lushnikov
9c89090f73
chore(testrunner): fix readme description (#3293) 2018-09-21 20:44:43 -07:00
Andrey Lushnikov
12e317ce17
chore: add .npmignore for testrunner (#3290) 2018-09-21 17:27:10 -07:00
Andrey Lushnikov
5b3ddf554a
chore(testrunner): bump version to v0.5.0-post (#3291) 2018-09-21 15:25:17 -07:00
Andrey Lushnikov
907d9bed6d
chore: prepare testrunner to be published to npm (#3289)
testrunner will be published as @pptr/testrunner.
2018-09-21 14:51:22 -07:00
Andrey Lushnikov
4e48dfc7a1
feat(launcher): add experimental "transport" option to pptr.connect (#3265)
This patch:
- adds experimental "transport" option to pptr.connect
- uses "transport" option to make sure Puppeteer-Web works with
  Target.exposeDevToolsProtocol

Drive-by: add `browser.target()` to access browser target.
2018-09-20 11:55:23 -07:00
Andrey Lushnikov
5acf953104
feat(frame): introduce Frame.goto and Frame.waitForNavigation (#3276)
This patch introduces API to manage frame navigations.
As a drive-by, the `response.frame()` method is added as a shortcut
for `response.request().frame()`.

Fixes #2918.
2018-09-20 11:31:19 -07:00
xcatliu
ad49f792a4 docs(api.md): Fix description of SecurityDetails class (#3277) 2018-09-20 07:48:30 -07:00
Andrey Lushnikov
0b9d8a6271
feat: async stacks for all "async" public methods (#3262)
This patch traces all public async methods and wraps them
in a helper method that tags the sync stack trace.

Later on, if the method call throws an exception, we add
a captured stack trace to the original stack trace with the "--ASYNC--"
heading.

An example of a stack trace:

```
Error: net::ERR_ABORTED at http://localhost:8907/empty.html
    at navigate (/Users/lushnikov/prog/puppeteer/lib/Page.js:622:37)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  -- ASYNC --
    at Page.<anonymous> (/Users/lushnikov/prog/puppeteer/lib/helper.js:147:27)
    at fit (/Users/lushnikov/prog/puppeteer/test/page.spec.js:546:18)
    at process._tickCallback (internal/process/next_tick.js:68:7)
```
2018-09-19 13:54:58 -07:00
Andrey Lushnikov
9223bca964
refactor: move navigation management to FrameManager (#3266)
This patch:
- moves implementation of page.goto and page.waitForNavigation
  into FrameManager. The defaultNavigationTimeout gets moved to
  FrameManager as well.
- moves NavigatorWatcher into FrameManager to avoid circular dependency

References #2918
2018-09-19 13:12:28 -07:00
xcatliu
27477a1d79 docs(api.md): Fix typo (#3273) 2018-09-19 05:58:04 -07:00
Andrey Lushnikov
b97bddf8e5
refactor: unify response tracking in page.goto and waitForNavigation (#3258)
This patch unifies logic in response trackign in page.goto and
page.waitForNavigation.

As a drive-by, we now make sure that we return the right response
for the right frame. This will come handy for future frame navigation
API.

References #2918
2018-09-18 00:15:50 +01:00
Andrey Lushnikov
a1a211d9e7
chore: nicer stack highlight (#3259)
Highlight part of the stack that points to where the actual
test failure happened.
2018-09-17 23:22:53 +01:00
Andrey Lushnikov
a4abb4a628
feat(chromium): Roll Chromium to r591618 (#3263)
This roll includes:
- https://crrev.com/591420 - DevTools: fix Target.exposeDevToolsProtocol
2018-09-17 23:21:55 +01:00
Andrey Lushnikov
7f00860abd
fix(browserfetcher): Fix windows fetching (#3256)
Since r591479 windows archives are uploaded with a different
name.
2018-09-17 18:15:08 +01:00
Andrey Lushnikov
f5d388af7d
docs(api.md): add example for Mouse class (#3244)
Fixes #3221.
2018-09-14 19:48:47 +01:00
Andrey Lushnikov
d547b9d24a
fix(browser): browser closing/disconnecting should abort navigations (#3245)
Fixes #2721.
2018-09-14 19:44:54 +01:00
Andrey Lushnikov
f0beabd22a
chore: drop DEBUG for public API calls (#3246)
This proved to be useless: we've never used it since we
released the initial version of puppeteer more than a year ago.
2018-09-14 18:23:30 +01:00
Łukasz Usarz
d929f7e213 fix: set JPG background to white when omitBackground option is used (#3240)
Fixes #3234
2018-09-14 11:03:33 +01:00
Andrey Lushnikov
6ec3ce6920
chore: make sure Puppeteer bundling works (#3239)
This patch:
- adds "browser" field to the package.json with default
  bundling options.
- introduces "bundle" and "unit-bundle" commands to
  create bundle and test bundle
- starts running bundle tests on Travis Node 8 bots

Fixes #2374.
2018-09-13 20:08:51 +01:00
Andrey Lushnikov
f49687f747
docs(api.md): add frame example (#3237)
Add an example on how to work with frame's API.

Fixes #3232.
2018-09-13 19:25:15 +01:00
Andrey Lushnikov
a582acd682
feat(chromium): roll Chromium to r590951 (#3236)
Just a healthy roll.
2018-09-13 19:14:47 +01:00
Andrey Lushnikov
7ec0801729
fix: expect Network.responseReceived event is never dispatched (#3233)
Fixes #2888.
2018-09-12 22:08:32 +01:00
Andrey Lushnikov
c644a3bbd3
test: make sure zero-width screenshots don't hang (#3214)
References #2672.
2018-09-11 19:07:57 +01:00
Andrey Lushnikov
9c4b6d06e2
refactor: use browser-compliant interface of 'ws' (#3218)
Bundled version of Puppeteer should rely on native WebSocket.

Luckily, 'ws' module supports the same interface as the native
browser websockets. This patch switches WebSocketTransport to
use the browser-compliant interface of 'ws'.

After this patch, I was able to bundle Puppeteer for browser
using the following config in `package.json`:

```json
"browser": {
  "./lib/BrowserFetcher.js": false,
  "ws": "./lib/BrowserWebSocket",
  "fs": false,
  "child_process": false,
  "rimraf": false,
  "readline": false
}
```

where `./lib/BrowserWebSocket` is:

```js
module.exports = WebSocket;
```

and the bundling command is:

```sh
$ browserify -r ./index.js:puppeteer > ppweb.js
```

References #2119
2018-09-11 18:41:28 +01:00
Elias Ojala
56b3bd809e docs(readme.md): Added yarn guide also to puppeteer-core (#3227) 2018-09-11 12:19:13 +01:00
Yaniv Efraim
6581ee974c docs: add ndb as a debugging tip (#3195) 2018-09-08 11:54:09 +01:00
Andrey Lushnikov
1b2c8113ba
refactor: move Connection to use ConnectionTransport (#3217)
Currently connection assumes that transport is a websocket
and tries to handle websocket-related errors.

This patch:
- moves ConnectionTransport interface to use callbacks instead
  of events. This way it could be used in browser context as well.
- introduces WebSocketTransport that implements ConnectionTransport
  interface for ws.

This is a preparation step for 2 things:
- exposing `transport` option in the `puppeteer.connect` method
- better support for `browserify`

References #2119
2018-09-07 21:36:16 +01:00
Divyansh Tripathi
c967aebc84 docs(api.md): add an include statement for puppeteer-core (#3213)
Fix #3204
2018-09-07 10:46:59 +01:00
Matt Zeunert
c5511ecb81 docs(api.md): Clarify how to call page.setCookie (#3215)
Fixes #3109
2018-09-07 10:46:12 +01:00
Andrey Lushnikov
78e9d5c422
chore: bump version to v1.8.0-post (#3212) 2018-09-06 22:03:42 +01:00
Andrey Lushnikov
aeb6a9991e
chore: mark version v1.8.0 (#3211) 2018-09-06 21:49:44 +01:00
Andrey Lushnikov
42fde9b5e2
chore: another attempt to fix pptr@next (#3210)
It turns out that travis runs commands in sh rather then in bash.

Fixes #2925.
2018-09-06 21:38:17 +01:00