Andrey Lushnikov
beea6f9c82
chore(testrunner): fix typo in readme
2018-04-10 12:25:14 -07:00
Andrey Lushnikov
fafd156d7b
fix(Page): support anchor navigation ( #2338 )
...
This patch fixes puppeteer navigation primitives to work with
same-document navigation.
Same-document navigation happens when document's URL is changed,
but document instance is not re-created. Some common scenarios
for same-document navigation are:
- History API
- anchor navigation
With this patch:
- pptr starts dispatching `framenavigated` event when frame's URL gets
changed due to same-document navigation
- `page.waitForNavigation` now works with same-document navigation
- `page.goBack()` and `page.goForward()` are handled correctly.
Fixes #257 .
2018-04-09 23:38:20 -07:00
Andrey Lushnikov
2b95774af9
docs(api.md): mention header/footer template limitations in page.pdf
. ( #2341 )
...
References #2167 .
2018-04-09 22:30:20 -07:00
Andrey Lushnikov
c5902de5d8
fix(Page): fix Page.evaluate with Symbols in arrays ( #2340 )
...
Fixes #2295 .
2018-04-09 22:02:35 -07:00
Andrey Lushnikov
5d106f79d8
test: flatten tests ( #2337 )
...
Today, we have tests split into multiple files, with files pulling
tests from some other files.
This patch starts explicitly gathering all tests from the same
`test.js` file.
Drive-By: move one test from `browser.spec.js` into `puppeteer.spec.js`
since it starts browser itself.
2018-04-09 16:38:00 -07:00
Andrey Lushnikov
06d61919ef
test: refactor utils.waitForEvents into utils.waitEvent ( #2336 )
...
This simplifies waiting for events in tests.
2018-04-09 15:46:05 -07:00
Andrey Lushnikov
c86c12e605
fix(Launcher): consume protocol errors when initiating browser.close() ( #2332 )
...
Handle errors properly while sending Browser.close()
Fixes #1429 .
2018-04-09 14:49:02 -07:00
Matt Gaunt
a052b9e774
docs(troubleshooting): Adding Travis CI mention ( #2334 )
2018-04-09 14:34:46 -07:00
Andrey Lushnikov
717d4a7ada
docs(api): warn about slow screenshots on OS X ( #2326 )
2018-04-07 18:01:31 -07:00
Andrey Lushnikov
57fa690724
fix(Connection): do not assert that methods always have callbacks. ( #2330 )
...
In certain cases, all callbacks could be rejected before we get a
response from transport. This is easily reproducible with `slowMo`
option.
Fixes #563 .
2018-04-07 17:59:22 -07:00
JoelEinbinder
294f33b75c
chore(types): type check the rest of the protocol ( #2328 )
...
This adds events and commands into generated `protocol.d.ts`.
2018-04-07 17:58:52 -07:00
Andrey Lushnikov
45d97e572a
feat(Chromium): roll Chromium to r549031 ( #2327 )
...
This roll includes:
- https://crrev.com/549003 - DevTools: make pptr tests pass with DCHECKs.
The patch fixes a browser crash that happens during browser close.
As a result, cookies were not saved properly (and thus the flaky test we
had).
Fixes #1537 .
2018-04-06 21:53:25 -07:00
JoelEinbinder
8c54f41552
chore(types): generate a d.ts file for protocol types ( #2325 )
...
This uses the `/json/protocol` endpoint to generate type definitions for the protocol.
Currently it is lacking protocol events and commands, but I will add those later.
2018-04-06 18:20:48 -07:00
Andrey Lushnikov
35e34db198
feat(Page): introduce Page.setBypassCSP ( #2324 )
...
This patch introduces `page.setBypassCSP` method that allows clients
to ignore Content-Security-Policy for a given page.
Fixes #1229 .
2018-04-06 16:35:50 -07:00
Andrey Lushnikov
dfcee2e631
feat(Chromium): roll Chromium to r548690 ( #2323 )
...
This roll includes:
- https://crrev.com/548598 - DevTools: implement Page.setBypassCSP method
- https://crrev.com/548690 - DevTools: introduce Page.navigatedWithinDocument event
References #1229 , #257 .
2018-04-06 16:11:49 -07:00
Andrey Lushnikov
846c0800b1
feat(Page): Page.addScriptTag should throw when blocked by CSP ( #2320 )
...
This patch teaches Page.addScriptTag and Page.addStyleTag to throw
an error when blocked by CSP.
References #1229 .
2018-04-06 13:17:55 -07:00
Andrey Lushnikov
4663b43a62
test: add test on Page.evaluateOnNewDocument with CSP ( #2319 )
...
This patch adds a test that Page.evaluateOnNewDocument works
with CSP: there's been some concerns on the bugtracker before.
References #1229
2018-04-05 23:40:14 -07:00
Ethan Lee
1fdd33886f
docs(api.md): fix minor spelling errors ( #2314 )
2018-04-05 13:08:28 -07:00
JoelEinbinder
2370618819
chore(types): upgrade to TypeScript 2.8.1 ( #2304 )
...
This converts `externs.d.ts` to export a global namespace instead of a UMD global.
See: https://github.com/Microsoft/TypeScript/issues/22969
Fixes #2279 .
2018-04-04 14:06:21 -07:00
Eric Bidelman
3b88d0d7c9
docs(readme): add googlechromelabs repo. ( #2306 )
2018-04-04 14:03:06 -07:00
Andrey Lushnikov
98093f0763
feat(Chromium): roll Chromium to r548153 ( #2312 )
...
This roll includes:
- https://crrev.com/547982 - v8 roll that includes [fixed
Runtime.callFunctionOn](1637818671
) method
The upstream fix makes it possible to run frame.waitFor* functions on
pages with strict CSP.
References #1229 .
2018-04-04 13:56:24 -07:00
Andrey Lushnikov
f925158733
test: add test for page.waitForFunction with script CSP ( #2305 )
...
This patch adds a test to fixate page.waitForFunction behavior
for pages with CSP.
References #1229 .
2018-04-03 15:21:08 -07:00
JoelEinbinder
94c32e4bc8
feat(Launcher): introduce pipe
option ( #2288 )
...
This patch introduces a new `pipe` option to the launcher to connect over a pipe.
In certain environments, exposing web socket for remote debugging is a security risk.
Pipe connection eliminates this risk.
2018-04-03 15:05:27 -07:00
Shayne Hartford
f51a315911
docs(README): Removed --save flag for npm install ( #2302 )
...
NPM 5+ --save is default to true.
2018-04-03 10:26:21 -07:00
Yaniv Efraim
dde45faaeb
feat(FrameManage): improve errors from frame.waitFor* methods ( #2292 )
...
This patch adds title for WaitTask, using it later in generating error messages and
making exceptions much more traceable.
Fixes #2037
2018-03-30 12:37:56 -07:00
Andrey Rublev
8b0fd0ae4a
feat(install): support npm config for chromium revision ( #2290 )
...
This patch:
- adds `npm_config_puppeteer_chromium_revision` support
- clarifies api documentation about variables from npm config
2018-03-30 10:49:48 -07:00
Andrey Lushnikov
c4da19bd23
test(ElementHandle.boxModel): remake test to make it more readable ( #2287 )
...
This patch:
- re-makes test for EH.boxModel to make it more readable
- slightly changes wording in the `docs/api.md`.
References #1357 .
2018-03-29 17:25:52 -07:00
Andrey Lushnikov
c6c60aa1cb
feat(Chromium): roll Chromium to r546920 ( #2286 )
...
This roll includes the following important CLs:
- https://crrev.com/545955 - DevTools: Update page scale immediately in InputHandler
- https://crrev.com/544446 - Make HeadlessWebContentsImpl::Close wait for the renderer to go
- https://crrev.com/546865 - DevTools(Headless): close WebContents when closed via
'window.close'
- https://crrev.com/546685 - Headless: Add support for the --remote-debugging-pipe flag
This should drastically reduce flakiness for pptr input events.
2018-03-29 14:14:25 -07:00
Yaniv Efraim
41d5838297
feat(ElementHandle): add ElementHandle.boxModel method ( #2256 )
...
This patch introduces ElementHandle.boxModel to get element's
box model.
Fixes #1357
2018-03-29 13:52:28 -07:00
Tim Nolet
d4f24f1ec5
docs(README): add checkly to list of services ( #2209 )
2018-03-29 10:54:49 -07:00
Glenn Vandamme
506103556b
feat(install): introduce PUPPETEER_CHROMIUM_REVISION ( #2246 )
...
This patch introduces PUPPETEER_CHROMIUM_REVISION environment variable
to specify chromium revision to be downloaded during install step.
2018-03-29 10:46:00 -07:00
Yaniv Efraim
ebe17371b0
chore: break page.spec.js to smaller files ( #2257 )
...
Break some large chunks into smaller files. This change will remove ~600 lines from `page.spec.js`
2018-03-29 10:42:23 -07:00
Yaniv Efraim
abb05e069d
feat(page): add an option to disable timeout for waitForFunction ( #2252 )
...
This patch adds support for `timeout: 0` to disable timeout for the following functions:
- `page.waitForFunction`
- `page.waitForXPath`
- `page.waitForSelector`
and their `frame` counterparts.
Fixes #2200
2018-03-28 16:34:37 -07:00
Andrey Lushnikov
71a07bb50c
chore: fixate TypeScript to ~2.7.0 ( #2280 )
...
This patch fixates TypeScript release to 2.7.X.
For some reason, tsc 2.8.X fails to lint our types.
References #2279
2018-03-28 15:16:31 -07:00
Vse Mozhet Byt
9af02a0d86
docs(api.md): fix some links ( #2253 )
2018-03-28 13:18:59 -07:00
JoelEinbinder
d46e157f19
feat(Page): page 'close' event ( #2232 )
...
This patch adds 'page.close' event.
References #952 .
2018-03-28 13:11:51 -07:00
Yaniv Efraim
47481967c5
test: Break 'page.spec.js' to smaller files ( #2218 )
...
This patch breaks huge `page.spec.js` into a bunch of smaller files.
2018-03-19 20:00:12 -07:00
Yaniv Efraim
38c6873fbb
test: break test.js into smaller files ( #2193 )
...
This patch breaks test.js into smaller files:
- `page.spec.js`
- `puppeteer.spec.js`
Fixes #2082
2018-03-16 15:33:31 -07:00
Andrey Lushnikov
311f307153
chore: bump version to v1.2.0-post ( #2205 )
2018-03-16 11:01:49 -07:00
Andrey Lushnikov
f2fae9f35a
chore: mark version v1.2.0 ( #2204 )
2018-03-15 19:18:46 -07:00
Georgii Dolzhykov
4e1f2e2eb2
fix(Launcher): killing a process can throw ( #2102 )
...
In case chrome process was terminated manually, killing the process
might throw 'no process with such pid' exception.
2018-03-15 17:40:24 -07:00
Andrey Lushnikov
ec3025fe84
feat(Network): implement request.redirectChain() api ( #2194 )
...
The request.redirectChain() returns all the requests issued to fetch
the resource.
Fixes #1816 .
2018-03-15 17:17:38 -07:00
Andrey Lushnikov
c4b1ac99b0
test: another attempt to fix sw test #2201
2018-03-15 16:58:02 -07:00
Andrey Lushnikov
150e5a9bbf
test: eliminate racy pattern in multiple tests ( #2202 )
...
This patch eliminates a race pattern we've been using in a bunch
of tests.
2018-03-15 16:53:34 -07:00
JoelEinbinder
309cafb876
feat(Chromium): roll chromium to r543305 ( #2196 )
...
This roll contains a [fix](https://chromium-review.googlesource.com/c/chromium/src/+/963302 ) for boundingBox not forcing a layout, and the patch contains a corresponding test.
2018-03-15 16:37:10 -07:00
JoelEinbinder
d79eb70267
fix(node6): fix one line await arrow functions #2198
...
When the start of the function body was await, the async function transformer behaves
non-deterministically and can break.
2018-03-15 14:54:23 -07:00
Pig Fang
7d387d8d75
chore(FrameManager): remove extra space ( #2187 )
2018-03-15 14:04:22 -07:00
Andrey Lushnikov
c082a82547
fix(Launcher): do not detach child process on windows ( #2081 )
...
Fixes #2053 .
2018-03-15 11:50:16 -07:00
Andrey Lushnikov
afcc74e7c7
test: fix Matcher.toEqual to not depend on key insertion order ( #2091 )
...
Objects `{foo: 1, bar: 2}` and `{bar: 2, foo: 1}` should be considered
equal.
2018-03-15 11:49:53 -07:00
Andrey Lushnikov
4b7fbf8ee0
test: fix serviceWorker test flakiness ( #2195 )
...
This patch starts waiting on serviceWorker registration.
2018-03-14 17:55:12 -07:00