Commit Graph

312 Commits

Author SHA1 Message Date
Drew Diamantoukos
b275e66594 chore: Spelling and Markdown Consistency (#1998)
- Adding missing language tags to markdown code blocks.
- Fixed various spelling mistakes my IDE complained to me about.
2018-02-08 22:59:46 -05:00
Andrew Collins
ac1b9a0eb0 feat(Page): add setCacheEnabled(enabled) to Page object (#1609)
This change adds in the `Page.setCacheEnabled(enabled)` method to toggle ignoring cache for each request.

Fixes #1556.
2018-02-08 00:58:48 -05:00
JoelEinbinder
cde6d6c4d0 docs: add the word the everywhere (#1988) 2018-02-07 17:20:28 -05:00
Andrey Lushnikov
a363a733b7
feat: Introduce BrowserFetcher class (#1983)
This patch introduces `BrowserFetcher` class that manages
downloaded versions of products.

This patch:
- shapes Downloader API to be minimal yet usable for our needs. This
  includes removing such methods as `Downloader.supportedPlatforms` and
  `Downloader.defaultRevision`.
- makes most of the fs-related methods in Downloader async. The only
  exception is the `Downloader.revisionInfo`: it has stay sync due to the
  `pptr.executablePath()` method being sync.
- updates `install.js` and `utils/check_availability.js` to use new API
- finally, renames `Downloader` into `BrowserFetcher`

Fixes #1748.
2018-02-07 12:31:53 -05:00
Andrey Lushnikov
ecc3adc279
feat(Response): add Response.fromCache / Response.fromServiceWorker (#1971)
This patch:
- introduces `test/assets/cached` folder and teaches server to cache
  all the assets from the folder
- introduces `test/assets/serviceworkers` folder that stores all the
  service workers and makes them register with unique URL prefix
- introduces `Response.fromCache()` and `Response.fromServiceWorker()`
  methods

Fixes #1551.
2018-02-05 17:59:07 -05:00
Alix Axel
660b65780f feat(Frame): add click(), focus(), hover(), tap() and type() (#1970)
This patch adds frame shortcuts to drive input:
- `Frame.click()`
- `Frame.focus()`
- `Frame.hover()`
- `Frame.tap()`
- `Frame.type()`
2018-02-05 17:58:03 -05:00
Michael Stillwell
48218fae8a docs(api.md): page.error event dispatchers error 2018-02-05 17:45:35 -05:00
Yaniv Efraim
2f1157b044 fix(Docs): fix Console example (#1961)
Fixes #1874
2018-02-05 17:44:22 -05:00
Eric Bidelman
1716a748aa docs(troubleshooting): add aws lambda resources (#1926) 2018-01-31 15:31:31 -08:00
Thibault Lenclos
4886d038d5 docs: fix typo in troubleshooting.md (#1909) 2018-01-26 23:00:18 -08:00
Andrey Lushnikov
ddc59b2472
docs(api.md): fix exposeFunction example (#1900) 2018-01-25 14:50:42 -08:00
Yaniv Efraim
189deb84c0 feat(Frame): add Frame.evaluateHandle (#1885)
This patch adds Frame.evaluateHandle method. The method is a shortcut
for frame.executionContext().evaluateHandle.

Fixes #1051
2018-01-24 21:16:01 -08:00
Bamboo
a39d96eae9 docs(api.md): fix sample code in API doc, request.url -> request.url() (#1889) 2018-01-24 21:09:37 -08:00
JoelEinbinder
f2b6016354 chore: switch to npm from yarn (#1878)
This patch:
- migrates CI to use NPM
- drops lockfiles (`yarn.lock`). Lockfiles are ignored by package
  managers when the package is installed as a dependency, so this makes CI closer to the 
  installation our clients run.
2018-01-22 17:11:10 -08:00
Abel Toledano
b61e67d001 feat: add slowMo option to puppeteer.connect (#1864)
This patch introduces a `slowMo` option to the `puppeteer.connect` method. The option
is similar to the one in `puppeteer.launch` and is used to slow down the connection.
2018-01-22 16:45:46 -08:00
Ram Dobson
cb684ebbc4 feat(Page): introduce Page.waitForXPath (#1767)
This patch:
- introduces `page.waitForXPath` method
- introduces `frame.waitForXPath` method
- amends `page.waitFor` to treat strings that start with `//` as xpath queries.

Fixes #1757.
2018-01-22 15:16:20 -08:00
Glenn Vandamme
62597bf897 docs(troubleshooting): Add fonts to docker example to support major charsets (#1842)
Fixes #1824.
2018-01-19 00:43:00 -08:00
Sakamoto, Kazunori
102f10cbc7 docs(api.md): Fix sample code in API doc (#1821)
Because `Request.url` is changed to `Request.url()`.
2018-01-18 21:39:50 -08:00
Vse Mozhet Byt
2bf42fd779 docs(troubleshooting): fix a link (#1845)
It seems without the full URL this link is not rendered correctly.
2018-01-18 21:20:16 -08:00
Sony AK
d2715d1c6f docs(api.md): fix typo on api docs (#1849) 2018-01-18 21:19:43 -08:00
Eric Bidelman
e031264231 docs(api): fix coverage example and typo (#1854) 2018-01-18 21:19:13 -08:00
Eric Bidelman
49d3799e32 docs(troubleshooting): add docker alpine example (#1836)
Fixes #1835, fixes #379
2018-01-17 22:01:31 -08:00
Ian Hunter
59f6d42610 feat: add Page.Events.DOMContentLoaded (#1730)
Fixes #1580
2018-01-16 23:22:44 -08:00
futpib
25b35c5789 docs(api.md): fix missing await in examples (#1801)
`frame.executionContext()` returns a Promise, so running examples without `await` results in exceptions
2018-01-16 16:59:00 -08:00
Alix Axel
31a1f9ad70 docs(api.md): added page.click + waitForNavigation example (#1792)
Fixes #1421.
2018-01-12 11:41:26 -08:00
Andrey Lushnikov
aed7019146
chore: bump version to 1.0.0-post (#1789) 2018-01-11 21:09:37 -08:00
Andrey Lushnikov
12b57e31f3
chore: mark version v1.0.0 (#1786) 2018-01-11 15:15:23 -08:00
Eric Bidelman
891a5539bd docs(troubleshooting): add note on using ldd to find missing deps (#1780) 2018-01-11 12:20:57 -08:00
Andrey Lushnikov
5368051610
feat: expose raw devtools protocol connection (#1770)
feat: expose raw devtools protocol connection

This patch introduces `target.createCDPSession` method that
allows directly communicating with the target over the
Chrome DevTools Protocol.

Fixes #31.
2018-01-10 19:33:22 -08:00
Radu Aron
ec8e40f1cb feat(Page): Add global navigation timeout setting (#1728)
This patch introduces `page.setDefaultNavigationTimeout` method to override the 
default 30 seconds navigation timeout.

Fixes #1514
2018-01-10 13:04:01 -08:00
Octavian Cioaca
3985dee54e docs(API): add more explicit examples for page.evaluate (#1711) 2018-01-09 23:05:52 -08:00
yujiosaka
c29822d663 feat: Attribute network requests to frames (#1646)
This patch introduces `request.frame()` method that returns the frame that
initiated request.

Fixes #1579
2018-01-09 18:47:21 -08:00
Kamakura Masaya
8c392b7ee8 docs(api.md): add missing parentheses after page.mainFrame (#1738) 2018-01-08 17:20:02 -08:00
yujiosaka
8e9c54a789 feat: introduce browser.userAgent() (#1716)
The patch introduces browser.userAgent() method to retrieve
default browser user agent.

Fixes #1706.
2018-01-05 10:14:30 -08:00
JoelEinbinder
05b1aca21e feat: support JSHandles for page.waitFor* calls (#1712)
This patch:
- teaches page.waitFor* methods to accept JSHandles
- starts returning JSHandles from page.waitFor* calls. 

BREAKING CHANGE: this patch starts allocating `JSHandle`/`ElementHandle` instances for every call to `page.waitFor*` functions. These handles should be disposed manually to avoid memory consumption.

Fixes #1703, fixes #1654, fixes #1724.
2018-01-04 14:49:13 -08:00
Eric Bidelman
32a7fd5f37 docs(troubleshooting): add note on --disable-dev-shm-usage for Docker (#1603) 2018-01-04 13:52:13 -08:00
Andrey Lushnikov
0a498bae3a
docs: update api.md
This patch clarifies when the "disconnected" event is emitted
and emphasizes the difference between Chromium and browser.

References #1589.
2018-01-04 02:27:57 -08:00
Andrey Lushnikov
24354a4879
feat: implement CSS Coverage (#1714)
This patch adds two new methods to the `page.coverage` namespace:
- `page.coverage.startCSSCoverage()` - to initiate css coverage
- `page.coverage.stopCSSCoverage()` - to stop css coverage

The coverage format is consistent with the JavaScript coverage.
2018-01-03 18:21:40 -08:00
JoelEinbinder
f183664d0f feat: rename page.xpath into page.$x, return an array of elements (#1713)
Fixes #1705.
2018-01-03 15:37:08 -08:00
Andrey Lushnikov
d062381978
feat: Implement JavaScript Coverage (#1673)
This patch introduces a new `page.coverage` namespace with two methods:
- `page.coverage.startJSCoverage` to initiate JavaScript coverage
  recording
- `page.coverage.stopJSCoverage` to stop JavaScript coverage and get
  results
2018-01-02 19:53:53 -08:00
yujiosaka
e32fdcb5bc chore(issue template): Add Node.js version to Issue template(#1683) (#1684) 2017-12-28 14:24:51 -08:00
Andrey Lushnikov
83fb29d4e7
docs: use less confusing synonym
This change was suggested in #1636.
2017-12-27 19:35:14 -08:00
JoelEinbinder
bf3e0cca57 docs: add missing session cookie property to api.md (#1672)
The session value is returned from the protocol, but not accepted as a cookie parameter.

Fixes #980.
2017-12-27 19:58:57 -07:00
JoelEinbinder
8a40cd5eef feat(Launcher): allow the default arguments to be overridden (#1623)
This patch:
- adds `puppeteer.defaultArgs()` method to get default arguments that are used to launch chrome
- adds `ignoreDefaultArgs` option to `puppeteer.launch` to avoid using default puppeteer arguments

Fixes #872
2017-12-19 17:51:21 -08:00
Audrius Jakumavicius
f8040cb2a2 feat(pdf): add headerTemplate and footerTemplate to available PDF options (#1625)
This patch allows specifying header and footer templates for PDF printing.

Fixes #373.
2017-12-19 16:54:34 -08:00
JoelEinbinder
60ba8c3af9 feat: add page.xpath (#1620)
This patch adds xpath support with the following methods:
- page.xpath
- frame.xpath
- elementHandle.xpath

Fixes #537
2017-12-19 16:23:45 -08:00
Eric Bidelman
1684104dc3 docs(troubleshooting.md): add missing temp missing shared lib (#1628)
Fixes #1627.
2017-12-19 16:11:55 -08:00
Andrey Lushnikov
b73737302a
fix: convert all getters to methods (#1621)
The patch converts all the getters in the codebase into the methods.
For example, the `request.url` getter becomes the `request.url()`
method.

This is done in order to unify the API and make it more predictable.
The general rule for all further changes would be:
- there are no getters/fields exposed in the api
- the only exceptions are "namespaces", e.g. `page.keyboard`

Fixes #280.

BREAKING CHANGE:
This patch ditches getters and replaces them with methods throughout
the API. The following methods were added instead of the fields:
- dialog.type()
- consoleMessage.args()
- consoleMessage.text()
- consoleMessage.type()
- request.headers()
- request.method()
- request.postData()
- request.resourceType()
- request.url()
- response.headers()
- response.ok()
- response.status()
- response.url()
2017-12-18 17:05:57 -08:00
Karl Brown
63f7e38077 docs(README.md): Update docs to more clearly differentiate between Chromium and Chrome (#1574)
This patch clarifies the documentation to more clearly note that Puppeteer works with both Chromium (by default)
and Chrome.

Fixes #1516
2017-12-14 19:09:48 -08:00
Andrey Lushnikov
4eaf52fa1d
feat(Browser): introduce browser.process() variable (#1581)
This patch adds a `browser.process()` getter to expose the child process
with running browser.

Fixes #1539.
2017-12-11 12:11:12 -08:00