Commit Graph

654 Commits

Author SHA1 Message Date
Tim van der Lippe
c1d7be379b
docs(api): add copy-pasting text example to Mouse class (#6000)
There are numerous issues on the Puppeteer issue tracker about selecting and copy-pasting of text (#3252, #4954,  #423, #1366, #343) as well as several StackOverflow questions:

- https://stackoverflow.com/questions/57101467/how-do-you-paste-text-using-puppeteer
- https://stackoverflow.com/questions/49131516/how-to-copy-text-from-browser-clipboard-using-puppeteer-in-nodejs
- https://stackoverflow.com/questions/60158746/how-do-i-access-the-contents-of-the-clipboard-from-within-a-headless-puppeteer-t
- https://stackoverflow.com/questions/56306153/domexception-on-calling-navigator-clipboard-readtext

I propose we include this commonly-asked question in the main documentation.

Fixes #3252.
Fixes #4954.
2020-06-12 07:32:59 +02:00
Jack Franklin
b86ff21b64
feat(api): add Page.isJavaScriptEnabled + mark properties as private (#5993)
Just one was used externally and I wrapped that up in a method. I think
it's a useful method to provide (I can imagine wanting to know if JS is
enabled on a page) so I think there's no harm here (I'd rather that then
have JSHandle reach into a private variable).
2020-06-10 16:15:02 +01:00
Henrik Skupin
9c656d417e
chore: remove prefers-color-scheme: no-preference (#5990)
The 'no-preference' value has been removed from the spec per resolution in [1]. The appropriate web-platform-tests [2] have already been updated.

[1] https://github.com/w3c/csswg-drafts/issues/3857#issuecomment-634779976
[2] https://github.com/web-platform-tests/wpt/pull/24024
2020-06-09 23:17:07 +02:00
Mathias Bynens
c2d32b1c19 chore: rename image assets 2020-06-02 15:24:25 +02:00
Lester Covax
a84e07ceaa
chore: increase readability of Puppeteer diagram (#5947) 2020-06-02 15:22:17 +02:00
Jack Franklin
58d1eab794
chore: mark version v3.3.0-post (#5960) 2020-06-02 15:20:20 +02:00
Jack Franklin
e84e579c3c
chore: mark version v3.3.0 (#5959) 2020-06-02 09:53:53 +01:00
Jack Franklin
309d8115c3
chore: Revert Mitt due to breaking changes (#5952)
Replacing the Node EventEmitter with Mitt caused more problems than
anticipated for end users due to the API differences and the amount of
people who relied on the EventEmitter API. In hindsight this clearly
should have been explored more and then released as a breaking v4.

This commit rolls us back to the built in Node EventEmitter library
which we can release to get everyone back on stable builds. We can then
consider our approach to migrating to Mitt and when we do do that we can
release it as a breaking change and properly document the migration
strategy and approach.
2020-06-02 09:32:02 +01:00
Jack Franklin
b874cacaef
chore: rename Worker to WebWorker (#5941)
To avoid TS name conflicts.
2020-05-29 12:57:54 +01:00
Jack Franklin
78624842ef
chore: update request and response references in docs (#5942)
Missed some Request => HTTPRequest and Response => HTTPResponse renames
when updating the docs.
2020-05-29 12:36:04 +01:00
Jack Franklin
232def0dcf
chore: rename Response to HTTPResponse (#5940)
To avoid any conflicts with the TS `Response` type.
2020-05-29 11:49:30 +01:00
Jack Franklin
cfd72acc57
chore: bump version to v3.2.0-post (#5938) 2020-05-29 11:27:54 +02:00
Jack Franklin
88b5265be1
chore: mark version v3.2.0 (#5937) 2020-05-29 10:22:13 +01:00
Jack Franklin
1d4d25a0f3
Use Mitt as the Event Emitter (#5907)
* chore: migrate to Mitt as the EventEmitter

This commit moves us to using Mitt [1] for the event emitter in
Puppeteer. This removes our dependency to Node's EventEmitter which is
part of a larger stream of work to enable a Puppeteer-web version that
doesn't depend on Node.

There are no large breaking changes as we support the main methods that
EventEmitter had, but it also provides some methods that Puppeteer
didn't use. Technically end users could depend on this but it's
unlikely.

[1]: https://github.com/developit/mitt
2020-05-29 09:59:26 +01:00
Jack Franklin
8e8a9df3dd
chore: rename Request class to HTTPRequest (#5934)
It conflicts with an inbuilt TypeScript `Request` type so can cause
confusion when in TS land. Note: `Response.ts` and `Worker.ts` also
suffer from this; PRs to rename them are incoming.
2020-05-29 09:38:40 +01:00
Mathias Bynens
7eab7f8dd9
feat(api): add page.emulateVisionDeficiency(type) (#5901)
Design doc: https://goo.gle/devtools-cvd
2020-05-26 17:14:20 +02:00
Islam ElHakmi
caaf4d2086
fix: support async functions as an argument for waitForFunction (#5682) 2020-05-19 09:09:31 +02:00
Alex Rudenko
e6c22dae05
chore: bump version to v3.1.0-post (#5884)
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2020-05-18 14:16:25 +02:00
Alex Rudenko
8ba36752e7
chore: mark version v3.1.0 (#5883)
* chore: mark version v3.1.0

Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>
2020-05-18 13:47:03 +02:00
Michal TOMA
a17bd89fb9 feat: add securityDetails.subjectAlternativeNames() #5628 (#5881)
Co-authored-by: Michal TOMA <michaltoma2205@gmail.com>
Co-authored-by: Alex Rudenko <alexrudenko@chromium.org>

Fixes #5625. Closes #5628.
2020-05-18 12:59:57 +02:00
Mathias Bynens
ad3613db14
docs(contributing): clarify list of Chromium versions (#5878) 2020-05-18 09:26:19 +02:00
Jack Franklin
ae576aff61
chore: mark v3.0.4-post (#5824) 2020-05-07 12:04:22 +02:00
Jack Franklin
c214d20d54
chore: mark version v3.0.4 (#5823) 2020-05-07 11:52:59 +02:00
Jack Franklin
51154824d8
chore: bump version to 3.0.3-post (#5814) 2020-05-06 17:27:31 +02:00
Jack Franklin
dd5bdf1616
chore: mark version v3.0.3 (#5813) 2020-05-06 15:57:04 +01:00
Vasilii Artemchuk
53d6fabf80
docs(api.md): improve emulateMediaFeatures section (#5807) 2020-05-05 07:43:14 +02:00
Jack Franklin
ec91ecaf0b
chore: migrate src/Launcher to TypeScript (#5775) 2020-04-30 13:45:58 +01:00
ɯλrv¬
a8908cf3e0
chore: update incorrect link for DeviceDescriptors (#5777) 2020-04-30 09:14:12 +01:00
Jack Franklin
8ddf4f3114
chore: bump version to 3.0.2-post (#5759) 2020-04-28 11:10:39 +01:00
Jack Franklin
646f42e98c
chore: mark version v3.0.2 (#5752) 2020-04-28 10:23:19 +01:00
Jack Franklin
1358b45fca
chore: migrate src/LifecycleWatcher (#5734) 2020-04-27 10:03:33 +01:00
Jack Franklin
1a4e260458
chore: migrate src/BrowserFetcher to TypeScript (#5727)
* chore: migrate src/BrowserFetcher to TypeScript
2020-04-24 08:57:53 +01:00
Jack Franklin
9d297f0827
chore: Bump version to 3.0.1-post (#5717) 2020-04-22 16:07:57 +01:00
Jack Franklin
6029fdd618
chore: mark version v3.0.1 (#5709) 2020-04-22 11:10:04 +01:00
Sam
69bfa80084
Update api.md (#5706) 2020-04-22 09:41:49 +01:00
atlanteh
ad6c57aeb9
docs: fix DeviceDescriptor link (#5683) 2020-04-20 09:20:52 +02:00
Mathias Bynens
80348dc574
chore: bump version to v3.0.0-post (#5649) 2020-04-16 11:23:26 +02:00
Changhao Han
6760b9225e
chore: mark version v3.0.0 (#5642)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-04-16 10:43:12 +02:00
Maja Frydrychowicz
d817ae5a4b
fix: update preferred revision after Launcher is created (#5640)
Fixes an edge case where Puppeteer looked for a Chromium revision when launching Firefox.

Allow appropriate Launcher to be instantiated when calling `Puppeteer.connect`.

Add an example of running Firefox.
2020-04-14 18:42:48 +02:00
Joshua H
21c2d31523
docs(api): update another emulateMediaType example (#5607) 2020-04-08 11:33:34 +02:00
Joshua H
fefa8ca8a2
docs(api): update emulateMediaType example (#5606) 2020-04-08 10:17:49 +02:00
Jack Franklin
88446df724
chore: fix missed src/ vs lib/ documentation (#5591)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-04-06 10:32:42 +02:00
Bello Gbadebo
b3b0dc5025
docs: replace invalid device descriptors link (#5589)
Fixes #5588.
2020-04-06 08:50:13 +02:00
Konstantin Vyatkin
f43468452a
chore: fix link to source files in documentation (#5576)
Look like it was overlooked while moving source files.
2020-04-03 12:02:24 +02:00
Maja Frydrychowicz
c82b5560f0
docs: connect works with any supported browser (#5572) 2020-04-02 10:35:47 +02:00
Maja Frydrychowicz
33f1967072
(feat) Add option to fetch Firefox Nightly (#5467)
* (feat) Add option to fetch Firefox Nightly

Add Firefox support to BrowserFetcher and the install script.
By default, the latest Firefox Nightly is downloaded
directly from archive.mozilla.org (dmg, tar.bz2 and zip)

This also required changes that impact `puppeteer.launch()`
and `puppeteer.executablePath()`

Fixes #5151

* Update docs/api.md

Co-Authored-By: Mathias Bynens <mathias@qiwi.be>

* Clean up revision promise

* Improve error handling in revision check

* Remove matchAll

* Use explicit octal mode

* Update .gitignore

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-03-10 21:59:03 +01:00
WuerfelDev
0b1777e73c
docs(api) Fix url (#5367)
A little slash had been missing since eddb23b521
2020-02-06 22:54:48 +01:00
Changhao Han
5ffcde2b7b
chore: bump version to v2.1.1.-post (#5390) 2020-02-06 16:28:15 +01:00
Changhao Han
46386eb866
chore: mark version v2.1.1 (#5388) 2020-02-05 14:36:04 +01:00
Grzegorz (Greg) Ziółkowski
0d243b7a0f feat: make it possible to run install.js script with puppeteer-core (#5325)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-01-28 13:08:13 +01:00
Feu
c283fea6c5 docs(api): add example to page.$$eval (#5200)
This makes it more clear that the callback receives an actual array of nodes instead of just a NodeList.

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-01-27 16:19:33 +01:00
Mathias Bynens
b45f8e4703
chore: bump version to v2.1.0-post (#5349) 2020-01-27 16:00:07 +01:00
Mathias Bynens
a30cf05e3a chore: mark version v2.1.0 (#5347)
This changes the Chromium revision to r722234 (Chrome 80.0.3987.0),
since that's the most recent version in the Chromium 80 range for
which a download exists for all supported platforms.
2020-01-27 15:48:40 +01:00
Mathias Bynens
eddb23b521
chore: update URLs (#5185) 2019-11-26 13:12:25 +01:00
Maja Frydrychowicz
c5a72e9887 feat(launcher): add option to run Puppeteer with different browsers (#5137)
* feat: Set which browser to launch via PUPPETEER_PRODUCT

This change introduces a PUPPETEER_PRODUCT environment
variable as a first step toward using Puppeteer with
many different browsers. Setting PUPPETEER_PRODUCT=firefox, for
example, enables Firefox-specific Launcher settings.

The state is also exposed as `puppeteer.product` in the API
to support adding other product-specific behaviour as needed.

The bulk of the change is a refactoring in Launcher
to decouple generic browser start-up from product-specific
configuration.

Respecting the puppeteer-core restriction for PUPPETEER_
environment variables, lazily instantiate the Launcher
based on a `product` Puppeteer.launch option, if available.

* test: Distinguish Juggler unit tests from Firefox

The funit script is renamed to fjunit (j for Juggler, which is
used only by the experimental puppeteer-firefox package.

In contrast, the funit script now refers to running Puppeteer
unit tests against the main puppeteer package with Firefox.
To do so with Firefox Nightly, run:

`BINARY=path/to/firefox npm run funit`

A number of changes in this patch make it easier to run
Puppeteer unit tests in Mozilla's CI.
2019-11-26 10:23:19 +01:00
Darío Kondratiuk
fd43f9c23a docs(api.md): fix defaultArgs link (#5126)
Closes #5094.
2019-11-04 19:43:04 -03:00
Chris Calo
5fa28b585f docs(api.md): fix typo (#5120) 2019-11-02 18:42:29 -04:00
Benj Fassbind
561c99d52a docs(api.md): prefer async/await over Promise#then (#5089)
Fixes #5082.
2019-10-26 11:00:39 +02:00
Mathias Bynens
7032472af7 chore: bump version to v2.0.0-post 2019-10-24 17:38:39 +02:00
Mathias Bynens
aa246973b9
chore: mark version v2.0.0 (#5078) 2019-10-24 14:46:50 +02:00
theeko
7f3e372b14 docs(api.md): improve page.waitFor docs for the options object (#5021) 2019-10-24 11:22:21 +02:00
Vse Mozhet Byt
8132b39a6c docs(api.md): remove duplicate code from an example (#5072) 2019-10-24 11:21:38 +02:00
Mathias Bynens
1248a19135
feat(api): add page.emulateTimezone(timezoneId) (#4949)
This enables dynamically changing the timezone of the page.
2019-10-23 15:49:39 +02:00
Mathias Bynens
a86363fda6
feat(api): add page.emulateMedia{Type,Features} (#5012) 2019-10-23 13:55:00 +02:00
Darío Kondratiuk
7dbb10859c docs(api): list Chromium version for Puppeteer v1.20.0 (#5015) 2019-10-10 11:44:18 +01:00
Chris B
dc57d03c19 docs(api): clarify type method examples (#5010) 2019-10-07 08:32:35 +02:00
Mathias Bynens
387a532707 chore: bump version to v1.20.0-post (#4939) 2019-09-13 19:58:13 -07:00
Mathias Bynens
a5f03ce1c8 chore: mark version v1.20.0 (#4928) 2019-09-12 15:21:21 -07:00
Pavel Feldman
73fd7ff822 feat(api): add element.select and element.evaluate for consistency (#4892) 2019-09-04 15:19:34 -07:00
Joel Einbinder
07eaad9aaa fix(api): tbd release date (#4872) 2019-08-22 15:03:26 -07:00
Yevhen
7fded54903 docs(api.md): fix typo (#4761) 2019-07-29 14:14:31 -07:00
Andrey Lushnikov
62f5dc7375
chore: bump version to v1.19.0-post (#4745) 2019-07-22 22:34:10 -07:00
Andrey Lushnikov
af0d229044
chore: mark version v1.19.0 (#4744) 2019-07-22 22:02:45 -07:00
Andrey Lushnikov
ea28cccfe0 feat(page): introduce file chooser interception (#4653)
This patch introduces a page.waitForFileChooser() method
that adds a watchdog to wait for file chooser dialogs.

This lets Puppeteer users to capture file chooser requests
and fulfill/cancel them if necessary.

Fixes #2946
2019-07-22 21:30:49 -07:00
Marc Jansen
492132f9b0 docs(api.md): Slightly enhanced wording (#4631) 2019-06-29 13:58:27 +02:00
Andrey Lushnikov
4ccd52c309
chore: bump version to v1.18.1-post (#4630) 2019-06-26 10:57:38 -07:00
Andrey Lushnikov
a2cf81dd78
chore: mark version v1.18.1 (#4628) 2019-06-26 10:40:38 -07:00
Andrey Lushnikov
411347cd7b
chore: bump version to v1.18.0-post (#4608) 2019-06-20 18:46:36 -04:00
Andrey Lushnikov
c96454d42c
chore: mark version v1.18.0 (#4606) 2019-06-20 18:13:45 -04:00
Takahiro Nishino
792264122c fix(page): fix A2 and A3 format size (#4569)
16.5 inch ~ 419.1mm
16.54 inch ~ 420.1mm

Fix #4568
2019-06-10 20:59:12 -07:00
Andrey Lushnikov
65b7e8ecc0
docs(api.md): add notes on race condition in page.setViewport (#4319)
Fixes #2755.
2019-06-10 18:07:24 -07:00
Michael Oryl
4bcdfc97dd docs(api.md): clarify frame/page.goto()'s handling of HTTP error statuses (#4553)
The documentation for frame.goto() and page.goto() were updated to make
it clear that the method will not throw an error if the HTTP requests
results in any valid HTTP status code being returned by the remote
server.
2019-06-09 18:32:06 -07:00
Andrey Lushnikov
f52738ec1e
docs(api.md): clarify on HTTP error responses (#4507) 2019-06-03 14:54:30 -07:00
Andrey Lushnikov
084cf02119
chore: bump version to v1.17.0-post (#4468) 2019-05-24 03:24:53 +03:00
Andrey Lushnikov
1840ef01cc
chore: mark version v1.17.0 (#4467) 2019-05-24 03:13:14 +03:00
Jake Causon
90a1032300 fix(network): stringify response headers for intercepted requests (#4436)
Stringifying the headers was the behaviour before v1.15

References #4379
2019-05-20 11:05:32 +03:00
Andrey Lushnikov
04906494c4
chore: bump version to v1.16.0-post (#4422) 2019-05-14 01:47:47 +03:00
Andrey Lushnikov
9f2635c4ac
chore: mark version v1.16.0 (#4421) 2019-05-14 01:15:35 +03:00
Joel Einbinder
a3cb16308c feat: root option in page.accessibility.snapshot() (#4318)
Going from `AXNode` -> `ElementHandle` is turning out to be controversial.

This patch instead adds a way to go from `ElementHandle` -> `AXNode`. If the API looks good, I'll add it into Firefox as well.

References #3641
2019-05-09 23:39:42 -07:00
Joel Einbinder
1516e0df21 feat(workers): create workers from service workers and shared workers (#4397)
This allows users to easily evaluate javascript inside service workers and shared workers by creating a Worker object for them.
2019-05-09 17:29:18 -07:00
Andrey Lushnikov
ef24c69c62
fix(tracing): start without options (#4388) 2019-05-09 17:15:33 -07:00
Tony Brix
511dcf9d32 feat(browser): Add browser.isConnected() (#4403)
Add `browser.isConnected()` to the public api to be able to tell when the browser is connected

fixes https://github.com/smooth-code/jest-puppeteer/pull/237#issuecomment-490260041
2019-05-09 16:24:52 -07:00
Andrey Lushnikov
e2e6b88934
feat(chromium): roll Chromium to r654752 (#4358)
This roll includes:
- https://crrev.com/653809 - FrameLoader: ignore failing provisional loads entirely
- https://crrev.com/654750 - DevTools: make sure Network.requestWillBeSent is emitted on time for sync xhrs

The FrameLoader patch is the reason behind the test change. It's
actually desirable to fail frame navigation if the frame detaches - and
that's consistent with Firefox.

Fixes #4337
2019-04-28 20:19:01 -07:00
Joel Einbinder
d64f700203 fix(docs): screen readers aren't the only kind of assistive technology (#4349)
The docs incorrectly implied that screen readers were the only assistive technology to do filtering on the tree.
@alice
2019-04-26 13:40:08 -07:00
Andrey Lushnikov
1e29e5bc0f
chore: bump version to v1.15.0-post (#4347) 2019-04-26 00:44:58 -07:00
Andrey Lushnikov
b9f4a95175
chore: mark version v1.15.0 (#4346) 2019-04-25 19:25:16 -07:00
Andrey Lushnikov
e3abb0aa32
feat(puppeteer): introduce puppeteer.errors and puppeteer.devices (#4312)
These getters are introduced as a more convenient substitute for
a `require('puppeteer/Errors')` and
`require('puppeteer/DeviceDescriptors')`.

This way we can make cross-browser story nicer - a single require
of `puppeteer` or `puppeteer-firefox` fully defines Puppeteer
environment.
2019-04-19 15:33:06 -07:00
John Youngblood
66ff4928eb docs(api.md): Working link to Linux differences (#4232)
A link on line 525 is pointing to a undefined branch (`lkcr`) in `chromium.googlesource.com/chromium/src/`. Change it to point to `lkgr` instead, since it's the closest defined branch in name.
2019-04-02 19:15:20 -07:00
Andrey Lushnikov
0adffcc2cb
docs: add table-of-contents to troubleshooting (#4234)
Drive-by: teach our table-of-contents generator to ignore comments
inside fenced blocks and to de-linkify titles.
2019-04-02 19:08:22 -07:00
Andrey Lushnikov
2c6df6ddd1
chore: bump version to v1.14.0-post (#4224) 2019-03-28 22:50:12 -07:00
Andrey Lushnikov
3fa91cace3
chore: mark version v1.14.0 (#4222) 2019-03-28 22:33:38 -07:00
Andrey Lushnikov
0d0e620405
docs(api.md): update ElementHandle example (#4169)
Fix #4150
2019-03-19 12:53:47 -07:00
Vse Mozhet Byt
854b1c0912 feat(executioncontext): support bigints transferring (#4016)
Refs: https://chromedevtools.github.io/devtools-protocol/tot/Runtime#type-UnserializableValue
2019-03-15 10:20:48 -07:00
Andrey Lushnikov
27cf8594c2
docs(api.md): add note regarding puppeteer.executablePath() (#4092)
References #4091
2019-03-14 11:32:44 -07:00
Andrey Lushnikov
808d1bb597
docs(api.md): add links to CDP guide and pptr.dev (#4159) 2019-03-13 13:17:10 -07:00
Andrey Lushnikov
1623bef264
test: improve test coverage for Request.continue (#4096)
Drive-by: add clarification to docs/api.md regarding
chaning "URL".

References #4030
2019-03-05 14:57:15 -08:00
Andrey Lushnikov
7462bdafa1
chore: bump version to v1.13.0-post (#4115) 2019-03-04 23:45:18 -08:00
Andrey Lushnikov
77a969419e
chore: mark version v1.13.0 (#4114) 2019-03-04 18:39:45 -08:00
Andrey Lushnikov
e3b76b2beb
feat(firefox): support consoleMessage.location() (#4002) 2019-02-13 19:56:56 -08:00
Andrey Lushnikov
e1000009a5
docs(api.md): update versions (#3916) 2019-02-05 12:46:31 -08:00
Andrey Lushnikov
a760d79c86
chore: bump version to v1.12.2-post (#3915) 2019-02-05 12:00:15 -08:00
Andrey Lushnikov
b0afb17b68
chore: mark version v1.12.2 (#3914) 2019-02-05 11:38:04 -08:00
Andrey Lushnikov
b0e8084650
chore: bump version to v1.12.1-post (#3886) 2019-02-01 12:47:56 -08:00
Andrey Lushnikov
a1abd6c1fc
chore: mark version v1.12.1 (#3885)
References #3878.
2019-02-01 12:30:21 -08:00
Andrey Lushnikov
718cdf123e
chore: bump version to v1.12.0-post (#3876) 2019-01-31 19:47:16 -08:00
Andrey Lushnikov
7f05a084f1
chore: mark version v1.12.0 (#3875) 2019-01-31 19:33:54 -08:00
Andrey Lushnikov
a064a6341b
feat(page): introduce page.setDefaultTimeout (#3854)
Method `page.setDefaultTimeout` overrides default 30 seconds timeout
for all `page.waitFor*` methods, including navigation and waiting
for selectors.

Fix #3319.
2019-01-28 17:16:12 -08:00
Joel Einbinder
f2c968fdb8 chore(types): generate our own d.ts file from api.md (#3744)
Generate `//index.d.ts` file with precise typescript definitions for all of the
Puppeteer API.
2019-01-28 15:12:45 -08:00
Andrey Lushnikov
2061dd4718
fix(page): teach waitForSelector to return null (#3846)
`page.waitForSelector` should return `null` if waiting for `hidden:
true` and there's no matching node in DOM.

Before this patch, `page.waitForSelector` would return some JSHandle
pointing to boolean value.
2019-01-28 14:24:53 -05:00
Dan Dascalescu
7446550fdb docs(api.md): fix typo (#3848) 2019-01-27 00:37:02 -05:00
Denny
7585e6db9e docs(api.md): expand puppeteer-core explanation (#3830) 2019-01-22 23:25:14 -05:00
Andrey Lushnikov
d346cb57b4
chore: cleanup puppeteer.connect({browserURL}) (#3766)
This patch:
- renames `browserUrl` into `browserURL`
- cleans up some code
- adds tests for error handling

References #3537
2019-01-14 14:30:03 -08:00
Łukasz Fiszer
15af75f9a2 feat(launcher): add browserUrl option to puppeteer.connect (#3558)
The `browserURL` option allows to connect to a browser that exposed it's remote debugging protocol on a known port.

Fixes #3537
2019-01-14 13:23:34 -08:00
Andrey Lushnikov
89fc2adff5
fix(page): consoleMessage.location() should work with workers (#3752)
This patch:
- refactors consoleMessage.location() implementation to
make it work for workers
- re-writes tests to avoid 5 second delay
2019-01-10 18:05:28 -08:00
Tom P
0c867631b0 feat(page): introduce consoleMessage.location() (#3365)
This patch adds a new consoleMessage.location() method that returns console message origins.

Fixes #3029
2019-01-10 16:51:13 -08:00
Andrey Lushnikov
1e66d332b8
docs(api.md): better documentation for PUPPETEER_DOWNLOAD_HOST (#3669)
Fix #3635.
2018-12-17 13:31:32 -08:00
Andrey Lushnikov
8aaca4eb1e
feat(page): introduce "Popup" event (#3661)
This patch adds a new "popup" event for page.
"Popup" event is fired whenever page opens another page with
given opener.
2018-12-12 17:09:42 -08:00
Andrey Lushnikov
c90392bdf5
feat: introduce page.browserContext() (#3655) 2018-12-12 15:08:31 -08:00
Andrey Lushnikov
45c4477e9f
chore: bump version to v1.11.0-post (#3613) 2018-11-29 22:38:54 -08:00
Andrey Lushnikov
00b15994a4
chore: mark version v1.11.0 (#3610) 2018-11-29 22:11:44 -08:00
Joel Einbinder
a0cbaf39ab chore(types): lint the api docs with typescript (#3577) 2018-11-21 14:49:08 -08:00
Andrey Lushnikov
927d0f443b
feat(page): support waitUntil option for page.setContent (#3557)
This patch teaches `page.setContent` to await resources in
the new document.

**NOTE**: This patch changes behavior: currently, `page.setContent`
awaits the `"domcontentloaded"` event; with this patch, we can now await
other lifecycle events, and switched default to the `"load"` event.

The change is justified since current behavior made `page.setContent`
unusable for its main designated usecases, pushing our client
to use [dataURL workaround](https://github.com/GoogleChrome/puppeteer/issues/728#issuecomment-334301491).

Fixes #728
2018-11-20 15:32:46 -08:00
Vse Mozhet Byt
86e09593bf docs(api.md): mark optional arguments in signatures (#3565)
Some `[]` marks were missing.
2018-11-19 12:36:28 -08:00
Nazanin Delam
f6bfa3231a docs(api.md): fixes #3517 (#3561)
Add required to height and width properties in setViewport function
2018-11-19 12:35:16 -08:00
Joel Einbinder
568734386d fix(types): fix parameters where they disagree with the api (#3525) 2018-11-12 12:59:21 -08:00
Vse Mozhet Byt
59e7e8c244 docs(api.md): update returned value description (#3514) 2018-11-08 18:33:22 -08:00
Joel Einbinder
79ec7a3fe5 fix(types): fix return types where JSDoc and api.md disagree (#3512) 2018-11-07 22:48:43 -08:00
Andrey Lushnikov
60a8d4115d
chore: bump version to v1.10.0-post (#3483) 2018-11-02 11:08:44 -07:00
Andrey Lushnikov
e9d89a2e21
chore: mark version v1.10.0 (#3482) 2018-11-01 20:09:04 -07:00
Joel Einbinder
9ba3261571 feat(accessibility): snapshot the accessibility tree (#3470)
This adds `page.accessibility.snapshot()`. It serializes and returns the accessibility tree for the page. By default, uninteresting nodes are filtered out of the snapshot.

fixes #2033
2018-11-01 18:54:51 -07:00
Andrey Lushnikov
e0610079b6
docs(api.md): update compatibility table 2018-11-01 16:41:20 -07:00
Andrey Lushnikov
8e93eab784
docs(api.md): add example to override request headers (#3475)
References #3458.
2018-11-01 15:44:04 -07:00
Andrea Giammarchi
9800b2c3c2 docs(api.md): Fix missing await in extension example (#3447)
The extensions example did not `await puppeteer.launch(...)` throwing errors right after awaiting `browser.targets()`.
2018-10-26 18:38:00 -07:00
Ola Flisbäck
cf8c62e835 docs(api.md): Fix ElementHandle example (#3401)
This patch fixes an ElementHandle example by
adding a missing parenthesis.
2018-10-16 17:24:46 -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
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
Raymond Tan
c9657f8819 docs(api.md): minor grammar and consistency fixes (#3320) 2018-10-02 13:38:41 -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