Commit Graph

409 Commits

Author SHA1 Message Date
Andrey Lushnikov
66caee4c60
chore: mark version v1.7.0 (#3059) 2018-08-09 18:53:24 -07:00
Andrey Lushnikov
be7626fa5e
fix: revert ExecutionContext reporting. (#3058)
It turned out that almost any usecase requires helper methods to access
DOM inside the ExecutionContext.

Instead of exposing execution contexts as-is, we should introduce
IsolatedWorld as a first-class citizen that will hold execution contexts
inside.
2018-08-09 18:14:21 -07:00
Joel Einbinder
28ccf5d795 docs(api.md): some grammar/wording (#3057) 2018-08-09 17:49:06 -07:00
Andrey Lushnikov
204c7ec8c4
feat: introduce puppeteer/Errors (#3056)
This patch adds a new require, `puppeteer/Errors`, that
holds all the Puppeteer-specific error classes.

Currently, the only custom error class we use is `TimeoutError`. We'll
expand in future with `CrashError` and some others.

Fixes #1694.
2018-08-09 16:51:12 -07:00
Andrey Lushnikov
231a2be971
feat: expose frame's execution contexts (#3048)
This patch exposes frame's execution contexts, making it possible
to debug extension's content scripts.

This is a resurrected #2812.
2018-08-09 14:57:08 -07:00
Vse Mozhet Byt
b84404c94e docs(api.md): fix a typo (#3055) 2018-08-09 14:45:15 -07:00
Andrey Lushnikov
40466cb3a4
feat(launcher): ignoreDefaultArgs to accept array of options (#3049)
If `ignoreDefaultArgs` is given an array of options, than
these options will be excluded from the default command-line
flags.
2018-08-08 19:10:10 -07:00
Andrey Lushnikov
d822401449
docs(api.md): clarify coordinate system in mouse (#3041) 2018-08-07 14:24:38 -07:00
Andrey Lushnikov
608f5b79fe
docs(api.md): clarification note on request interception (#3042)
Fixes #3040.
2018-08-07 14:24:27 -07:00
Steren
735e17e223 docs(troubleshooting): Add instructions to run on App Engine and Cloud Functions (#3021) 2018-08-07 13:22:49 -07:00
Joel Einbinder
6825088644 feat(launcher): allow options to be passed into puppeteer.defaultArgs (#2950) 2018-08-07 13:22:04 -07:00
Joel Einbinder
25632133e2 feat: add option to specify the default viewport (#3005)
Fixes #1183.
2018-08-01 16:23:03 -07:00
Paul Shibanov
fd5d95bd99 docs(troubleshooting): update Chromium package supported on Alpine (#2997) 2018-07-31 15:07:59 -07:00
Andrey Lushnikov
c018ff1555
feat(browsercontext): add BrowserContext.pages() method (#3003) 2018-07-31 13:24:29 -07:00
Fred Chasen
12e3510eca feat(page): add 'preferCSSPageSize' to page.pdf options (#2928)
Fixes #1963.
2018-07-26 18:51:44 -07:00
Andrey Lushnikov
d09b3042fd
docs(api.md): elaborate on passing arguments in waitForFunction (#2921) 2018-07-26 16:26:37 -07:00
Pavel Pomerantsev
26cd16c724 docs(api.md): expand on testing Chrome Extensions (#2893)
Fixes #2823
2018-07-18 19:33:51 -07:00
Maxi Cilauro
e4e72c9e81 docs(api.md): fix typo (#2890) 2018-07-16 15:07:54 -07:00
Andrey Lushnikov
8802253e13
chore: bump version to v1.6.0-post (#2883) 2018-07-12 18:11:51 -07:00
Andrey Lushnikov
3762de7b91
chore: mark version v1.6.0 (#2882) 2018-07-12 17:26:57 -07:00
Matthew Shirley
726c8dc046 feat(page): introduce waitForRequest and waitForResponse methods (#2776)
This patch introduces `page.waitForRequest` and `page.waitForResponse` helper methods.

Fixes #2362
2018-07-12 14:36:31 -07:00
Pavel Pomerantsev
12bc1e1a62 feat(coverage): add an option to collect coverage of anonymous scripts (#2796)
This patch adds `reportAnonymousScripts` option to the `coverage.startJSCoverage` method. With this option, anonymous scripts are reported as well.

Fixes #2777
2018-07-11 18:38:34 -07:00
Bogdan Ponomarenko
96c558d544 feat(elementhandle): introduce elementHandle.isIntersectingViewport() method. (#2673)
This patch introduces  `elementHandle.isIntersectingViewport()` method returns
true if element is visible in the viewport.

Fixes #2629.
2018-07-11 17:51:04 -07:00
Matthew Haughton
eb53a8fdd0 docs(api.md): Fix selector description for pages & frames (#2841) 2018-07-05 03:01:40 +03:00
Kaveet Laxmidas
acb89dddba docs(api.md): add note on page.pdf() color rendering behavior (#2821)
Adds guidance for producing accurate colors in PDF output. page.pdf() can produce unexpected document colors unless forced to render exact colors.

Fixes #2685
2018-06-29 09:57:03 -07:00
Andrey Lushnikov
6ca43cf761
docs(api.md): clarify docs about waitForNavigation (#2788) 2018-06-26 13:42:50 -07:00
Vse Mozhet Byt
811415bc8c docs(api.md): fix a typo (#2789) 2018-06-21 10:37:07 -07:00
Vse Mozhet Byt
3b20839ab5 docs(api.md): update note about page.goto() returned value (#2787)
Fixes: #2765
2018-06-21 10:20:39 -07:00
Mickael van der Beek
1064aa4476 feat(request): add new error reasons for request.abort() (#2771)
As the title indicated, adds two allowed error codes that are specified in the Chrome Developer Tools Protocol specifications but missing from the Puppeteer enum:

https://chromedevtools.github.io/devtools-protocol/tot/Network#type-ErrorReason
2018-06-19 10:46:17 -07:00
Yaniv Efraim
38f112f395 feat(target): add support for target.page for 'backgroud_page' (#2600)
This patch teaches `target.page()` method to attach to extension background pages.

Fixes #2438
2018-06-14 13:58:51 -07:00
蒋璇
eca661096b docs(api.md): fix keyboard.press note about modifier keys (#2711) 2018-06-14 10:25:27 -07:00
Konstantin Simon Maria Möllers
1875cb4877 docs(api.md): fix return type docs of ElementHandle.$x (#2723) 2018-06-13 20:49:24 -07:00
Joel Einbinder
147f98d1f0
chore: bump version to v1.5.0-post (#2699) 2018-06-07 13:04:00 -07:00
Joel Einbinder
194d580026
chore: mark version v1.5.0 (#2698) 2018-06-07 12:19:25 -07:00
Joel Einbinder
2ff0adcad8 feat: worker convenience methods (#2677)
This patch:
- adds `worker.evaluate` and `worker.evaluateHandle` methods as a shortcut to their execution context equivalents.
- makes the error messages a bit nicer when interacting with a closed worker (as opposed to a closed page).
- moves the worker tests into their own spec file.
2018-06-06 20:16:17 -05:00
Darío Kondratiuk
e03802688d docs(api.md): Fix CDPSession code example (#2654) 2018-06-01 11:26:40 -07:00
Andrey Lushnikov
724fa512cf
feat(network): introduce Request.isNavigationRequest() method (#2633)
This patch introduces `Request.isNavigationRequest()` method.

Fixes #2627, #1132.
2018-05-31 17:38:30 -07:00
Jan Potoms
f6356683cd feat(targets): add target.opener() (#2641)
This adds a `.opener` property to a target so that its origin can be tracked.
For now returns `null` when there's no `openerId`.

Fixes #1830
2018-05-31 17:06:29 -07:00
Andrey Lushnikov
754df58d4e
docs(api.md): fix table-of-contents (#2636)
This patch drops the markdown-toc module and instead rolls out
our own simple markdown table-of-contents generator.

As a side effect, it fixes links to `page.$` and `page.$$`.
2018-05-31 14:21:43 -07:00
Yotam Laufer
469b910a2d feat(page): allow screenshot to return a base64 string (#2586)
Fixes #2566
2018-05-30 14:27:08 -07:00
Robert Shilston
5ff67dbdfe docs(api.md): Add the word "network" (#2624) 2018-05-29 15:24:26 -07:00
Yaniv Efraim
f6393d876e docs(api.md): mention that page.$$eval and frame.$$eval return arrays (#2595)
Docs about `page.$$eval` and `frame.$$eval` are not accurate and might be confusing. `document.querySelectorAll` returns `NodeList`, while `frame.$$eval` is actually doing `Array.from(querySelectorAll(selector))`, which actually returns an array. 

This makes things this possible:

`await page.$$eval('div', divs => divs.map...)` 

This patch fixes docs to mention that $$eval is actually performing:

`Array.from(querySelectorAll(selector))`

Which will let the user understand that the element he receives is an array, and not a NodeList.
2018-05-25 17:28:13 -07:00
Vasyl Pahut
1e07925e26 feat(elementhandle): add elementHandle.$$eval method (#2589)
Fixes #2401
2018-05-25 16:56:51 -07:00
Alex Veligura
32f4c173c8 feat(page): add page.isClosed method (#2588)
Fixes #2501.
2018-05-25 16:53:57 -07:00
Andrey Lushnikov
b522ecaa65
docs(api.md): update puppeteer overview (#2584)
Puppeteer tip-of-tree includes both workers and browser contexts.
2018-05-25 16:47:15 -07:00
Darío Kondratiuk
17bc6515de docs(api.md): goForward should say "can not go forward" (#2578) 2018-05-21 14:37:58 -07:00
Joel Einbinder
93fe2b57d6 feat(Page): introduce workers (#2560)
This adds `page.workers()`, and two events `workercreated` and `workerdestroyed`. It also forwards logs from a worker into the page `console` event.

Only dedicated workers are supported for now, ServiceWorkers will probably work differently because they aren't necessarily associated with a single page.

Fixes #2350.
2018-05-21 14:31:11 -07:00
Matej Plavevski
de82b87cfa docs(documentation) capitalize and end sentences (#2537) 2018-05-16 14:55:27 -07:00
Rafal Jarmolkovič
23d25a6e12 feat(Target): Pass through "background_page" types (#2439) (#2493) 2018-05-16 14:36:34 -07:00
Andrey Lushnikov
3b03ff65c7
feat(BrowserContext): introduce Browser Contexts. (#2523)
This patch introduces Browser Contexts and methods to manage them:
- `browser.createIncognitoBrowserContext()` - to create new incognito
  context
- `browser.browserContext()` - to get all existing contexts
- `browserContext.dispose()` - to dispose incognito context.

Fixes #85.
2018-05-10 13:26:08 -07:00