Commit Graph

663 Commits

Author SHA1 Message Date
release-please[bot]
e8e18ae081
chore: release main (#9684)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-02-15 12:43:41 -08:00
jrandolf
cfb60d01a8
refactor: remove obsolete wait task binding code (#9679) 2023-02-15 10:57:24 -08:00
jrandolf
2b3cf3ace9
chore: implement P queries (#9639) 2023-02-15 10:42:32 -08:00
jrandolf
e8f25e403f
refactor: custom query handlers and global bindings (#9678) 2023-02-15 07:33:18 -08:00
Nikolay Vitkov
0c85c0611c
chore: Implement JSHandle for BiDi (#9660) 2023-02-15 10:29:18 +00:00
jrandolf
56f99f7b10
refactor: migrate to iterator-based query handlers (#9676) 2023-02-14 13:31:30 -08:00
jrandolf
023c2dcdbc
refactor: implement reverse argument binding (#9651) 2023-02-14 07:54:44 -08:00
Alex Rudenko
c6054ac1a5
fix: make chromium-bidi an opt peer dep (#9667) 2023-02-14 09:04:54 +00:00
jrandolf
eb138635d6
fix: fix circularity on JSHandle interface (#9661) 2023-02-13 11:25:07 -08:00
jrandolf
b53838682f
chore: cleanup wireit scripts (#9662) 2023-02-13 10:22:43 -08:00
jrandolf
78a302174e
chore: use wireit from workspace scripts (#9659) 2023-02-13 06:50:44 -08:00
release-please[bot]
8054bac046
chore: release main (#9624)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-02-13 11:16:54 +01:00
Alex Rudenko
df59d010c2
feat(chromium): roll to Chromium 111.0.5556.0 (r1095492) (#9656) 2023-02-13 09:46:01 +00:00
jrandolf
558a8e2999
chore: fix npm scripts (#9646) 2023-02-10 17:57:17 +00:00
Nikolay Vitkov
b8ea891ab8
chore: Extract JSHandle to API (#9632) 2023-02-09 18:04:06 +01:00
Rafael Martins
ddb0cc174d
fix: page.goto error throwing on 40x/50x responses with an empty body (#9523) (#9577)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2023-02-06 09:40:51 +00:00
Nikolay Vitkov
9b11b6a4e0
chore: Add BiDi serialization for RegExp and Date (#9623) 2023-02-03 12:32:26 +00:00
charlieinitialdigital
c8bb11adfc
feat: add touchstart, touchmove and touchend methods (#9622) 2023-02-03 10:59:21 +00:00
jrandolf
6e226bcc22
chore: set supported typescript range (#9618) 2023-02-03 07:56:10 +00:00
Nikolay Vitkov
abcc1756dd
chore: Add BiDi Page.evaluate (#9609) 2023-02-02 15:14:28 +01:00
Nikolay Vitkov
3a867919a8
chore: Remove Rollup dts plugin (#9614) 2023-02-02 11:17:28 +01:00
Rafael-Martins
f12f27e1eb
docs: clarify the waitForXPath return type (#9541) (#9583) 2023-02-01 15:23:32 +00:00
release-please[bot]
1dd7bbe04f
chore: release main (#9606)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-02-01 14:49:00 +00:00
ggorlen
e16cbc6626
fix: restore WaitTask terminate condition (#9612) 2023-02-01 00:10:02 -08:00
Nikolay Vitkov
aa1d1536b6
chore: Update build dependencies (#9600) 2023-01-30 13:30:49 +01:00
Alex Rudenko
390685bbe5
fix: ignore not found contexts for console messages (#9595) 2023-01-30 10:22:55 +00:00
release-please[bot]
6f094d2f83
chore: release main (#9601)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-01-27 14:43:05 -08:00
jrandolf
050a7b0624
fix: atomically get Puppeteer utilities (#9597) 2023-01-27 11:58:40 -08:00
release-please[bot]
76c7f71ecc
chore: release main (#9591)
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-01-26 01:50:42 -08:00
jrandolf
1980de91a1
fix: mimic rejection for PuppeteerUtil on early call (#9589) 2023-01-26 01:34:47 -08:00
Alex Rudenko
6edd996768
fix(revert): use LazyArg for puppeteer utilities (#9590)
Reverts puppeteer/puppeteer#9575
2023-01-26 09:50:06 +01:00
jrandolf
496658f029
fix: use LazyArg for puppeteer utilities (#9575)
This PR fixes the following edge case:

 - `const oldPromise = world.puppeteerUtil`. 
- setContext occurs but context is immediately destroyed, i.e.
`world.#puppeteerUtil === oldPromise` is not resolved.
- clearContext occurs due to destruction, i.e. `world.#puppeteerUtil` is
replaced (`world.#puppeteerUtil !== oldPromise`).
 - `oldPromise` never resolves.
2023-01-26 08:56:33 +01:00
Alex Rudenko
344bc2af62
fix: don't clean up previous browser versions (#9568)
Since we moved to the central binaries cache it does not make sense to
clean up old binaries automatically because multiple installations can
use different versions. We expect the users to clean the cache from time
to time until we offer a CLI for managing the browsers.

Closes #9533
2023-01-24 17:28:00 +01:00
release-please[bot]
e13e9647fc
chore: release main (#9501)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.6.0</summary>

##
[19.6.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.5.2...puppeteer-v19.6.0)
(2023-01-23)


### Miscellaneous Chores

* **puppeteer:** Synchronize puppeteer versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.5.2 to 19.6.0
</details>

<details><summary>puppeteer-core: 19.6.0</summary>

##
[19.6.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.5.2...puppeteer-core-v19.6.0)
(2023-01-23)


### Features

* **chromium:** roll to Chromium 110.0.5479.0 (r1083080)
([#9500](https://github.com/puppeteer/puppeteer/issues/9500))
([06e816b](06e816bbfa)),
closes [#9470](https://github.com/puppeteer/puppeteer/issues/9470)
* **page:** Adding support for referrerPolicy in `page.goto`
([#9561](https://github.com/puppeteer/puppeteer/issues/9561))
([e3d69ec](e3d69ec554))


### Bug Fixes

* firefox revision resolution should not update chrome revision
([#9507](https://github.com/puppeteer/puppeteer/issues/9507))
([f59bbf4](f59bbf4014)),
closes [#9461](https://github.com/puppeteer/puppeteer/issues/9461)
* improve screenshot method types
([#9529](https://github.com/puppeteer/puppeteer/issues/9529))
([6847f88](6847f8835f))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-01-23 17:48:02 +01:00
Ophir Back
e3d69ec554
feat(page): Adding support for referrerPolicy in page.goto (#9561)
Issue: #9394

**What kind of change does this PR introduce?**

Feature - Added support of the `referrerPolicy` parameter (from CDP's
`Page.navigate`) to Puppeteer's `page.goto`.

**Did you add tests for your changes?**

No, currently it has no meaning that isn't browser implementation based,
which might get broken in the future. If there are suggestions to tests,
please let me know so I'll add them.

**If relevant, did you update the documentation?**
Yes, the documentation of the `goto` method has been updated.

**Summary**
I wanted to contribute to this project, which I used for testing on our
environment and saw issue #9394, so I decided to resolve it :)

**Does this PR introduce a breaking change?**
No. I added the `referrerPolicy` as an optional parameter, which will
use the HTTP header `Referrer-Policy` if not provided (much like the
`referer` parameter) so it will not interfere.

Co-authored-by: Ophir Back <ophir.back@broadcom.com>
2023-01-23 11:11:20 +00:00
Alex Rudenko
a919d18ea7
chore: fix third_party build (#9554)
The third_party folder is compiled with tsc and then rolled up in-place.
This means that the next build might try to compile the file that has
been rolled up leading to build errors. It seems the safest solution is
to always rebuild third_party folder as the size is relatively small.
2023-01-20 14:12:03 +00:00
Alex Rudenko
6847f8835f
fix: improve screenshot method types (#9529)
The only drawback of adding overrides is that our documentation
generator would generate a page for each overload which might be hard to
read/find on the documentation website.

Closes #9512 #9385
2023-01-18 14:06:20 +00:00
Kyrylo
3e80667048
chore: use named import for devtools-protocol module (#9511)
<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**
types fix

**Did you add tests for your changes?**
No

**If relevant, did you update the documentation?**
Not relevant

**Summary**
I am updating `import`s of `devtools-protocol` to always use named
import instead of the default.
For some reason, typescript doesn't understand when it is imported as
default.

```
node_modules/puppeteer-core/lib/esm/puppeteer/common/TargetManager.d.ts:23:59 - error TS2694: Namespace '"/Users/kyrylo/pacakge/node_modules/puppeteer-core/node_modules/devtools-protocol/types/protocol"' has no exported member 'Target'.

23 export declare type TargetFactory = (targetInfo: Protocol.Target.TargetInfo, session?: CDPSession) => Target;
                                                             ~~~~~~


Found 1 error in node_modules/puppeteer-core/lib/esm/puppeteer/common/TargetManager.d.ts:23
```

**Does this PR introduce a breaking change?**
No
<!-- If this PR introduces a breaking change, please describe the impact
and a migration path for existing applications. -->

**Other information**
I am updating `import`s of `devtools-protocol` to always use named
import instead of the default.
2023-01-17 11:34:57 +00:00
Kian-Meng Ang
4437bceb6e docs: fix typos (#9476)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2023-01-16 20:25:09 +01:00
Alex Rudenko
f59bbf4014
fix: firefox revision resolution should not update chrome revision (#9507)
Drive-by: don't override options in PuppeteerNode if they are provided.

Closes #9461
2023-01-13 10:57:48 +00:00
Alex Rudenko
06e816bbfa
feat(chromium): roll to Chromium 110.0.5479.0 (r1083080) (#9500)
Closes #9470
2023-01-12 11:31:20 +01:00
release-please[bot]
e9df6750d2
chore: release main (#9495)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.5.2</summary>

##
[19.5.2](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.5.1...puppeteer-v19.5.2)
(2023-01-11)


### Miscellaneous Chores

* **puppeteer:** Synchronize puppeteer versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.5.1 to 19.5.2
</details>

<details><summary>puppeteer-core: 19.5.2</summary>

##
[19.5.2](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.5.1...puppeteer-core-v19.5.2)
(2023-01-11)


### Bug Fixes

* make sure browser fetcher in launchers uses configuration
([#9493](https://github.com/puppeteer/puppeteer/issues/9493))
([df55439](df554397b5)),
closes [#9470](https://github.com/puppeteer/puppeteer/issues/9470)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2023-01-12 08:21:09 +01:00
Alex Rudenko
df554397b5
fix: make sure browser fetcher in launchers uses configuration (#9493)
Issue #9470
2023-01-11 21:09:56 +01:00
release-please[bot]
5087bf771c
chore: release main (#9491) 2023-01-11 16:26:44 +01:00
jrandolf
9bf90d9f4b
fix: use puppeteer node for installation script (#9489)
Fixed: https://github.com/puppeteer/puppeteer/issues/9470
2023-01-11 16:15:53 +01:00
release-please[bot]
8f99a79ee4
chore: release main (#9466) 2023-01-09 10:58:41 +01:00
Junyan
6bc152ece0
chore: small refactor for screenshotTask (#9451) 2023-01-02 11:01:36 +01:00
Alex Rudenko
29a50764d4
chore: add BiDi integration for Chromium (#9410)
This PR adds experimental support for WebDriver BiDi by making use of
chromium-bidi to implement the BiDi protocol. The tests are disabled on
Windows due to flakiness (filed
https://github.com/GoogleChromeLabs/chromium-bidi/issues/361).
2022-12-20 14:37:31 +00:00
Alex Rudenko
842008102f
chore: add deps needed for BiDi (#9439)
Extracted new dev deps from
https://github.com/puppeteer/puppeteer/pull/9410 to avoid constance
merge conflicts. https://github.com/puppeteer/puppeteer/pull/9410 needs
some investigation on Windows.
2022-12-19 15:54:58 +01:00
jrandolf
3f52212fc8
chore: update dependencies (#9436)
Fixed: https://github.com/puppeteer/puppeteer/issues/9372
2022-12-19 15:26:58 +01:00
jrandolf
c7a063a152
feat: add element validation (#9352)
This PR adds a method to ElementHandle that validates the tag type of
that handle and returns it.

Fixed: #8579, #9280
2022-12-19 13:25:56 +01:00
Darío Kondratiuk
e3e9cc622a
fix(puppeteer-core): target interceptor is not async (#9430)
I found that the only call to `addTargetInterceptor` passes
`onAttachedToTarget` and is not async.
I also found a typo 🤓
2022-12-17 17:47:21 +00:00
release-please[bot]
848c849358
chore: release main (#9395) 2022-12-16 14:21:28 +01:00
dependabot[bot]
cd073ab51f
chore(deps): Bump ws from 8.10.0 to 8.11.0 (#9412)
Bumps [ws](https://github.com/websockets/ws) from 8.10.0 to 8.11.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/websockets/ws/releases">ws's
releases</a>.</em></p>
<blockquote>
<h2>8.11.0</h2>
<h1>Features</h1>
<ul>
<li><code>WebSocket.prototype.addEventListener()</code> now supports an
event listener
specified as an object with a <code>handleEvent()</code> method.
(9ab743aa).</li>
</ul>
<h1>Bug fixes</h1>
<ul>
<li><code>WebSocket.prototype.addEventListener()</code> now adds an
event listener only if it
is not already in the list of the event listeners for the specified
event type
(1cec17da).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="afd8c6269b"><code>afd8c62</code></a>
[dist] 8.11.0</li>
<li><a
href="1cec17da06"><code>1cec17d</code></a>
[fix] Add the same event listener only once</li>
<li><a
href="9ab743aa70"><code>9ab743a</code></a>
[feature] Add support for objets with a <code>handleEvent()</code>
method</li>
<li><a
href="38f78794ca"><code>38f7879</code></a>
[ci] Test on node 19</li>
<li>See full diff in <a
href="https://github.com/websockets/ws/compare/8.10.0...8.11.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ws&package-manager=npm_and_yarn&previous-version=8.10.0&new-version=8.11.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-14 14:55:17 +00:00
Alex Rudenko
02fe50194e
fix: improve a11y snapshot handling if the tree is not correct (#9405)
Bug #9404
2022-12-13 08:31:26 +00:00
y-yagi
a3045435a2
docs: mention how to disable timeout for page.pdf() (#9167)
**What kind of change does this PR introduce?**

Add how to disable timeout for `page.pdf()`.

**Summary**

This was mentioned in the PR that adding this feature
https://github.com/puppeteer/puppeteer/pull/7508 But it has lost at
https://github.com/puppeteer/puppeteer/pull/8593.

I'm not sure why this was removed, but I think this info is useful for
users.

**Does this PR introduce a breaking change?**

no
2022-12-12 12:12:18 +00:00
Alex Rudenko
1668d47b2f
docs: various doc improvements (#9396)
See commits for details.

Closes #1837, #5880, #7822, #8101, #8821, #9367, #9382, #9378, #4731
2022-12-09 13:57:39 +01:00
Alex Rudenko
810e0cd74e
fix: remove oopif expectations and fix oopif flakiness (#9375)
With M109 the flakiness should be reduced. Any present flakiness should
be investigated.

Drive-by: a new debugging helper to debug on CI.
2022-12-09 11:36:39 +00:00
Nikolay Vitkov
89ff872120
chore: Update CI file to use new set method (#9389)
Closes #9373,
Fixes #9296
2022-12-09 10:49:53 +01:00
Thibaud Colas
afc75884d7 docs: fix documentation typo in Page.waitForSelector optional visible parameter (#9381)
**What kind of change does this PR introduce?**

Typo fix in the documentation

**Did you add tests for your changes?**

No

**If relevant, did you update the documentation?**

N/A

**Summary**

I spotted the `Visible` parameter had an uppercase `V` in the [Remarks
section of the Page.waitForSelector API
documentation](https://pptr.dev/api/puppeteer.page.waitforselector#remarks).
Updated this to the lowercase `v` in the relevant places (source,
documentation, versioned version of the doc page).

While doing this, I also spotted there was an extra space in `are :` in
the sentence above – so changed that as well.

**Does this PR introduce a breaking change?**

No

**Other information**

I’ve confirmed the parameter is spelled correctly on
https://pptr.dev/api/puppeteer.waitforselectoroptions. I’m not sure why
the documentation for those properties is in two places with slightly
different wording – but to me it felt useful to see this directly on the
method’s API docs.
2022-12-08 13:59:18 +01:00
release-please[bot]
931d4fced5
chore: release main (#9322)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.4.0</summary>

##
[19.4.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.3.0...puppeteer-v19.4.0)
(2022-12-07)


### Features

* **chromium:** roll to Chromium 109.0.5412.0 (r1069273)
([#9364](https://github.com/puppeteer/puppeteer/issues/9364))
([1875da6](1875da6191)),
closes [#9233](https://github.com/puppeteer/puppeteer/issues/9233)


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.3.0 to 19.4.0
</details>

<details><summary>puppeteer-core: 19.4.0</summary>

##
[19.4.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.3.0...puppeteer-core-v19.4.0)
(2022-12-07)


### Features

* ability to send headers via ws connection to browser in node.js
environment
([#9314](https://github.com/puppeteer/puppeteer/issues/9314))
([937fffa](937fffaedc)),
closes [#7218](https://github.com/puppeteer/puppeteer/issues/7218)
* **chromium:** roll to Chromium 109.0.5412.0 (r1069273)
([#9364](https://github.com/puppeteer/puppeteer/issues/9364))
([1875da6](1875da6191)),
closes [#9233](https://github.com/puppeteer/puppeteer/issues/9233)
* **puppeteer-core:** keydown supports commands
([#9357](https://github.com/puppeteer/puppeteer/issues/9357))
([b7ebc5d](b7ebc5d9bb))


### Bug Fixes

* **puppeteer-core:** avoid type instantiation errors
([#9370](https://github.com/puppeteer/puppeteer/issues/9370))
([17f31a9](17f31a9ee4)),
closes [#9369](https://github.com/puppeteer/puppeteer/issues/9369)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-12-07 19:35:29 +01:00
Nikolay Vitkov
1875da6191
feat(chromium): roll to Chromium 109.0.5412.0 (r1069273) (#9364)
Closes #9233
2022-12-07 14:54:00 +01:00
Robin Richtsfeld
1501edefa8
docs(requestinterception): remove outdated note (#9358)
See #7304 @jschfflr Seems like we missed some
Thanks to @chrismdd for spotting this
2022-12-07 07:33:27 +00:00
Alex Rudenko
17f31a9ee4
fix(puppeteer-core): avoid type instantiation errors (#9370)
Using the accumulator allows enabling the tail-recursion optimization in
the TypeScript compiler.

Closes #9369
2022-12-06 19:21:08 +01:00
Junyan
b7ebc5d9bb
feat(puppeteer-core): keydown supports commands (#9357)
Issue: #1313

<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

Feature.

**Did you add tests for your changes?**

Yes.

**If relevant, did you update the documentation?**

Yes.

**Summary**

Supports keyboard shotcuts on MacOS. See Chrome Devtools Protocol
document:
https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent.
2022-12-03 11:23:47 +01:00
Alex Rudenko
3cdd5d8292
chore: fix build deps (#9344) 2022-11-30 10:46:46 +01:00
Alex Rudenko
f3c87dcdb7
chore: upgrade mitt (#9340) 2022-11-29 19:50:58 +00:00
Alex Rudenko
e8c1d56845
chore: import BiDi impl only if the user opts in (#9335) 2022-11-29 15:18:40 +01:00
jrandolf
cb01c5c043
docs: remove comments on Page implementation (#9325)
This PR removes comments on CDPPage since they are redundant.
2022-11-24 13:10:29 +01:00
Dmitriy Dudkevich
937fffaedc
feat: ability to send headers via ws connection to browser in node.js environment (#9314)
**What kind of change does this PR introduce?**

I have browsers pool in some cloud. I want that only users with access
will be able to connect to them. So they must provide token through
headers. But puppeteer does not allow to send headers when connected to
browser by ws connection. So I added this feature.

Closes #7218
2022-11-24 11:00:03 +01:00
release-please[bot]
c4803e4a37
chore: release main (#9313)
🤖 I have created a release *beep* *boop*
---


<details><summary>ng-schematics: 0.1.0</summary>

## 0.1.0 (2022-11-23)


### Features

* **ng-schematics:** Release @puppeteer/ng-schematics
([#9244](https://github.com/puppeteer/puppeteer/issues/9244))
([be33929](be33929770))
</details>

<details><summary>puppeteer: 19.3.0</summary>

##
[19.3.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-v19.2.2...puppeteer-v19.3.0)
(2022-11-23)


### Miscellaneous Chores

* **puppeteer:** Synchronize puppeteer versions


### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.2.2 to 19.3.0
</details>

<details><summary>puppeteer-core: 19.3.0</summary>

##
[19.3.0](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.2.2...puppeteer-core-v19.3.0)
(2022-11-23)


### Features

* **puppeteer-core:** Infer element type from complex selector
([#9253](https://github.com/puppeteer/puppeteer/issues/9253))
([bef1061](bef1061c06))
* **puppeteer-core:** update Chrome launcher flags
([#9239](https://github.com/puppeteer/puppeteer/issues/9239))
([ae87bfc](ae87bfc2b4))


### Bug Fixes

* remove boundary conditions for visibility
([#9249](https://github.com/puppeteer/puppeteer/issues/9249))
([e003513](e003513c0c))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-11-23 14:14:25 +01:00
Joe Gomain Hoyes
bef1061c06
feat(puppeteer-core): Infer element type from complex selector (#9253)
**What kind of change does this PR introduce?**

Better type inference.

**Did you add tests for your changes?**

~Not yet.~ Yes.

**If relevant, did you update the documentation?**

Not yet.

**Summary**

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->
Currently methods that return an element handle, i.e. `.$`,
`.waitForSelector` attempt to infer the node element type from the
selector string. However, this only works when the selector is an exact
match of the element tag, i.e. a selector `"a"` would be inferred as
`HTMLAnchorElement` . And not when the selector is complex, i.e.
selectors `"a#some-id"`, `div > a`, `a:nth-child(2)` would all fallback
on `Element`.

This is due to simply looking up the the selector in
`HTMLElementTagNameMap` and `SVGElementTagNameMap` without any attempt
to parse the selector string.

This PR is an attempt to do so.

**Does this PR introduce a breaking change?**

<!-- If this PR introduces a breaking change, please describe the impact
and a migration path for existing applications. -->
This could break existing incorrect assertions using the `as` keyword.

**Other information**

~This PR introduces a dependency on the `type-fest` package.~

This PR is far from complete (no tests, no docs). Put out early for
feedback and discussion.

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-11-23 10:59:23 +01:00
Guillaume Gomez
0a2d310e4e
docs: fix typo in Viewport fields (#9293)
The `deviceScalarFactor` field of `Viewport` is actually named
`deviceScaleFactor`.
2022-11-17 17:27:07 +01:00
jrandolf
e003513c0c
fix: remove boundary conditions for visibility (#9249)
Fixed: https://github.com/puppeteer/puppeteer/issues/9232
2022-11-14 09:34:07 +01:00
Alex Rudenko
30c6b13eec
chore: re-export all exports (#9241)
Adds index files to subfolders and removes generation of types.ts in
puppeteer-core.
2022-11-10 17:11:18 +01:00
Alex Rudenko
ae87bfc2b4
feat(puppeteer-core): update Chrome launcher flags (#9239)
This PR adds:
- `--disable-component-update`
- `--disable-features=MediaRouter`
- `--disable-features=OptimizationHints`

and removes `--disable-features=AvoidUnnecessaryBeforeUnloadCheckSync`.

See
https://github.com/GoogleChrome/chrome-launcher/blob/main/docs/chrome-flags-for-tools.md
2022-11-10 11:43:37 +01:00
release-please[bot]
30e5b1a58e
chore: release main (#9210) 2022-11-03 11:02:28 +01:00
jrandolf
29f47e2e15
fix: update missing product message (#9207)
This PR updates the error message printed when a browser cannot be
found.

Related: https://github.com/puppeteer/puppeteer/issues/9192,
https://github.com/puppeteer/puppeteer/issues/9162
2022-11-03 09:32:17 +01:00
release-please[bot]
990635abc9
chore: release main (#9184)
🤖 I have created a release *beep* *boop*
---


<details><summary>puppeteer: 19.2.1</summary>

### Dependencies

* The following workspace dependencies were updated
  * dependencies
    * puppeteer-core bumped from 19.2.0 to ^19.2.1
</details>

<details><summary>puppeteer-core: 19.2.1</summary>

##
[19.2.1](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v19.2.0...puppeteer-core-v19.2.1)
(2022-10-28)


### Bug Fixes

* resolve navigation requests when request fails
([#9178](https://github.com/puppeteer/puppeteer/issues/9178))
([c11297b](c11297baa5)),
closes [#9175](https://github.com/puppeteer/puppeteer/issues/9175)
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
2022-11-02 10:54:37 +01:00
Alex Rudenko
c11297baa5
fix: resolve navigation requests when request fails (#9178)
#8768 fixes flakiness in handling navigations but it didn't account for
the fact that subsequent navigation requests could be aborted via the
request interception. In that case, the navigationResponseReceived
promise would never be resolved. This PR adds a listener for the failed
network requests and resolves the promise if the network request has
failed. Adding test coverage for this seems tricky, as the reproduction
depends on timing of the second navigation request.

Closes #9175
2022-10-28 09:56:06 +02:00
release-please[bot]
4ef83e0ee6
chore: release main (#9168) 2022-10-26 09:51:16 +02:00
dependabot[bot]
e19dd6c92c
chore(deps): bump ws from 8.9.0 to 8.10.0 (#9159) 2022-10-25 15:31:48 +02:00
Alex Rudenko
e78a4e89c2
feat(chromium): roll to Chromium 108.0.5351.0 (r1056772) (#9153) 2022-10-25 12:55:19 +02:00
release-please[bot]
b020c5746d
chore: release main (#9156) 2022-10-24 16:31:12 +02:00
jrandolf
95d77c679c
chore: revert "chore: release main" (#9155)
Reverts puppeteer/puppeteer#9152
2022-10-24 16:23:24 +02:00
release-please[bot]
10b59a9a63
chore: release main (#9152) 2022-10-24 13:58:47 +02:00
jrandolf
f07ad2c661
fix: update documentation on configuring puppeteer (#9150)
This PR updates the docs regarding configuring puppeteer. In addition,
some changes have been made to the documentation generator to show
default values on the documentation site.

Also fixes: https://github.com/puppeteer/puppeteer/pull/9144
2022-10-24 09:07:05 +02:00
release-please[bot]
4bf338b26d
chore: release main (#9143) 2022-10-21 15:52:43 +02:00
jrandolf
ec201744f0
feat: use configuration files (#9140)
This PR adds configurations files to `puppeteer`'s methods for
configuration. Under the hood, `puppeteer` relies on
https://www.npmjs.com/package/cosmiconfig which resolves several formats
of configuration:

- a `puppeteer` property in package.json
- a `.puppeteerrc` file in JSON or YAML format
- a `.puppeteerrc.json`, `.puppeteerrc.yaml`, `.puppeteerrc.yml`,
`.puppeteerrc.js`, or `.puppeteerrc.cjs` file
- a `puppeteer.config.js` or `puppeteer.config.cjs` CommonJS module
exporting an object

Documentation will be added later.

Fixed: #9128
2022-10-21 15:09:21 +02:00
jrandolf
efcbc97c60
fix: update BrowserFetcher deprecation message (#9141) 2022-10-20 13:25:24 +02:00
Alex Rudenko
122778a1f8
feat: expose browser context id (#9134)
Closes #9132
2022-10-19 08:30:57 +00:00
Alex Rudenko
a19b270018
chore: extract BrowserContext to its own file (#9133) 2022-10-19 07:06:31 +00:00
release-please[bot]
dc66207f25
chore: release main (#9115) 2022-10-14 14:54:46 +02:00
jrandolf
8f4902eed9
chore: use test runner for installation tests (#9110) 2022-10-14 13:37:07 +02:00
jrandolf
6a05d8e9c1
chore: improve docs and scripts (#9107)
This PR updates some docs and scripts related to the recent changes in
the repository.
2022-10-13 18:55:11 +02:00
jrandolf
1fbc3c643f
chore: improve docs (#9105)
This PR makes some improvements to the documentation. It migrates
docker, debugging, and chrome extension documentation to the `guides`
folder and also updates some of the terminology.
2022-10-13 08:46:53 +00:00
Alex Rudenko
8acafe2fd9
chore: remove special handling for shared_worker (#9096)
With Chromium M107+ this should not be required anymore.
2022-10-11 12:18:06 +00:00
jrandolf
3df375baed
feat!: use ~/.cache/puppeteer for browser downloads (#9095) 2022-10-11 11:20:45 +00:00
jrandolf
7294dfe9c6
feat!: deprecate createBrowserFetcher in favor of BrowserFetcher (#9079)
This PR deprecates the `createBrowserFetcher` API and requests users to
import the `BrowserFetcher` directly.

Fixed: #8999
2022-10-10 17:51:18 +02:00
jrandolf
1847704789
fix!: refactor custom query handler API (#9078)
This PR removes the deprecated query selector API from the `puppeteer`
instance. Direct imports of the query selector API have also been
deprecated and users are now expected to use the static methods defined
on `Puppeteer`.
2022-10-10 16:01:09 +02:00
jrandolf
acbc59999b
fix: remove viewport conditions in waitForSelector (#9087)
This PR removes the viewport conditions in `waitForSelector`.

See discussion:
https://github.com/puppeteer/puppeteer/pull/8954#issuecomment-1272338883
2022-10-10 16:00:47 +02:00
jrandolf
87c08fd86a
fix!: remove puppeteer.devices in favor of KnownDevices (#9075)
This PR removes the deprecated `puppeteer.devices` in favor of a new
exported object `KnownDevices`. `devices` can also be exported, but has
been deprecated.
2022-10-10 15:30:12 +02:00
smithc
a032583b6c feat: add ability to collect JS code coverage at the function level (#9027) 2022-10-06 23:53:05 +02:00
jrandolf
41d0122b94 fix!: deprecate indirect network condition imports (#9074) 2022-10-06 23:52:58 +02:00
jrandolf
9f4f43a28b fix!: deprecate indirect error imports (#9072) 2022-10-06 23:52:51 +02:00
release-please[bot]
58ac7a687c
chore: release main (#9067) 2022-10-06 12:22:55 +02:00
jrandolf
9d13343d67
chore: update publish workflow (#9065)
This PR combines the publishing workflows for npm packages and Docker.
It also fixes an issue where multiple tags would trigger publishing all
packages.
2022-10-06 11:44:52 +02:00
jrandolf
416d56b033
chore: refactor utils (#9053)
This PR

- renames the `utils` folder to `tools` (follows internal practice),
- migrates the contents of `scripts` into `tools` and removes scripts.
2022-10-06 10:27:14 +02:00
jrandolf
9374e23d3d
fix: add README to package during prepack (#9057) 2022-10-06 09:13:54 +02:00
Egor Andreyuk
8f6b2c9b7c
fix: waitForRequest works with async predicate (#9058) 2022-10-05 20:46:34 +02:00
release-please[bot]
ee1272e65e
chore: release main (#9052) 2022-10-05 16:51:59 +02:00
jrandolf
d1b61cf108
chore: update generate sources (#9049) 2022-10-05 15:35:00 +02:00
jrandolf
f42336cf83
feat: separate puppeteer and puppeteer-core (#9023)
This PR moves the puppeteer source code into separate mono-repo packages:

- `puppeteer` and `puppeteer-core` are now separated into their own
packages.
- `puppeteer-core` has a new exports called `puppeteer-core/internal`
for internal usage.

Tests and various tools have been updated to accommodate the migration.
2022-10-05 14:17:03 +02:00