Commit Graph

38 Commits

Author SHA1 Message Date
jrandolf
e6442dd767
chore: use curly (#8519) 2022-06-14 13:55:35 +02:00
jrandolf
6c960115a3
chore: use private fields (#8506) 2022-06-13 11:16:25 +02:00
jrandolf
b30f3f44cd
fix: parse empty options in <select> (#8489) 2022-06-09 13:27:34 +02:00
Junyan
92110151d9
fix: multiple same request event listener (#8404) 2022-05-30 20:34:08 +00:00
Alex Rudenko
0ae8936f5e
chore: disable failing permission test (#8337) 2022-05-12 20:09:23 +02:00
Darío Kondratiuk
25d363bf9c
test: move async predicate to waitForResponse describe (#8285) 2022-04-28 14:51:57 +00:00
Julian Descottes
2b45027d25
fix: enable page.spec event handler test for firefox (#8214) 2022-04-08 13:01:03 +00:00
Julian Descottes
04e5c88997
fix: ignore favicon requests in page.spec event handler tests (#8208) 2022-04-07 16:06:12 +00:00
Michael Mok
5c308b0704
fix: ensure dom binding is not called after detach (#8024)
* fix: ensure dom binding is not called after detatch

Fixes #7814

* refactor: detach listeners instead

* refactor: safer approach

* fix: test in test/page.spec.ts

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
2022-02-17 15:52:51 +00:00
Edgard Lorraine Messias
d0cb9436a3
fix(page): fix page.off method for request event (#7624)
This patch fixes page.off for request event

Closes: #7572
2021-10-04 06:59:46 +00:00
Josh Grime
44c9ec67c5
fix(page): fallback to default in exposeFunction when using imported module (#6365) 2021-09-29 18:32:49 +02:00
Alex Rudenko
99ca842124
feat(page): expose page.client() (#7582)
Puppeteer already allows creating a new CDP session
via target.createCDPSession but there is no way
to get access to any existing session to send
some additional commands.
2021-09-21 07:39:47 +00:00
Max White
eda5171279
feat: add durableStorage to allowed permissions (#5295) 2021-09-16 10:35:36 +00:00
Noam Lustiger
300be5d167
feat: add id option to addScriptTag (#5477) 2021-09-14 23:02:05 +02:00
Li Wenyan
f90af6639d
feat: support timeout for page.pdf() call (#7508) 2021-09-14 16:11:14 +00:00
Tom Jenkinson
a21b7376e7
fix(test): tweak waitForNetworkIdle delay in test between downloads (#7564) 2021-09-14 14:46:53 +02:00
Tom Jenkinson
3c6029c702
feat(api): implement Page.waitForNetworkIdle() (#5140)
which will wait for there to be no network requests in progress during the `idleTime` before resolving.
2021-09-11 22:28:12 +02:00
Rowan Merewood
7200b1a6fb
feat: add support for useragentdata (#7378)
Adds userAgentData to setUserAgent that supports specifying user agent
data for the new navigator.userAgentData and Client Hints headers.
2021-06-29 18:29:55 +02:00
Brian Misiak
e3699e248b
feat: add a streaming version for page.pdf
Co-authored-by: Jan Scheffler <janscheffler@chromium.org>
2021-06-23 14:51:38 +02:00
Darío Kondratiuk
b4509d31cc
test: fix page.browserContext test title (#7292) 2021-05-27 13:51:41 +00:00
Darío Kondratiuk
ad523c87fa
test: move network emulation tests to the emulation spec file (#7293) 2021-05-27 13:17:12 +00:00
Darío Kondratiuk
2c9ff4feaf
test: fix typo in page test (#7277) 2021-05-26 14:52:54 +00:00
Robin Richtsfeld
e0b35d7d1d
test: remove console.log in unit test (#7216)
Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2021-05-17 07:32:53 +00:00
Henrik Skupin
bf60a300e7
chore: improve "Page.close should run beforeunload if asked for" unit test for Firefox (#6995) 2021-03-16 15:35:32 +01:00
Jack Franklin
a5e174f696
fix: expose puppeteer.Permission type (#6856)
* fix: expose puppeteer.Permission type

A regression in our own types when compared to @types/puppeteer - we
needed to expose the permissons.
2021-02-11 15:44:56 +00:00
Maksim Sadym
8f9fbdbae6 feat(chromium): roll Chromium to r843427 (#6797)
This corresponds to Chromium 89.0.4389.0.

This roll includes:

- Add `SameParty` attribute to cookies
  https://crrev.com/c/2598846
- Anchor `target=_blank` implies `rel=noopener`
  https://crrev.com/c/1630010
- Don’t expect ignored elements in the AXTree
  https://crrev.com/c/2505362

BREAKING CHANGE: The built-in `aria/` selector query handler doesn’t return ignored elements anymore.

Issue: #6758
2021-02-02 08:40:56 +01:00
Jan Scheffler
5ea76e9333
feat: add page.emulateNetworkConditions (#6759) 2021-01-21 10:00:57 +01:00
Michael Kebede
b57f3fcd53
feat: support promise as return value for page.waitForResponse predicate (#6624)
Co-authored-by: Joni <josalmi@google.com>
2020-11-25 11:35:47 +01:00
Jack Franklin
f04bec5a15
chore: update eslint & eslint plugins (#6487)
Updates ESLint, the TypeScript ESLint plugins, and updates code where
the rules have changed.
2020-10-12 10:30:35 +01:00
Johan Bay
49f25e2412
feat(chromium) roll Chromium to r809590 (#6458)
This corresponds to Chromium 87.0.4272.0
This roll includes:
- Reland "idle-detection: Implement requestPermission() method"
  (crrev.com/c/2417779)
2020-10-01 08:24:47 +02:00
Yang Guo
96f3d439f5
feat(console): expose stack trace for console messages (#6445) 2020-09-25 15:27:13 +02:00
Christian Bromann
9bc063b5ef
chore: assert location value of ConsoleMessage in tests (#6282) 2020-07-29 12:13:50 +01:00
Jack Franklin
f1a6b8d66d
chore: vendor Mitt & update project structure (#6209)
* chore: vendor Mitt into src/common/third-party

As discussed in #6203 we need to vendor our common dependencies in so
that when we ship an ESM build all imports point to file paths and do
not rely on Node resolution (e.g. a browser does not understand `import
mitt from 'mitt'`).
2020-07-14 16:57:29 +01:00
Jack Franklin
ffec2475d0
chore: enforce file extensions on imports (#6202)
* chore: enforce file extensions on imports

To make our output agnostic it should include file extensions in the
output, as per the ESM spec. It's a bit odd for Node packages but makes
it easier to publish a browser build.
2020-07-13 10:22:26 +01:00
Jack Franklin
9b3005c105
feat(types): improve page.evaluate types (#6193) 2020-07-10 11:52:13 +01:00
Jack Franklin
12434663e2
chore: remove installAsyncStackHooks helper (#6186)
* chore: remove `installAsyncStackHooks` helper

This code was written when browsers/Node didn't support errors in async
functions very well. They now do a much better job of this, so we can
lose the additonal complexity from our codebase and leave it to the host
environment :)

* lazy launcher is private

* remove async stack test
2020-07-09 11:38:25 +01:00
Jack Franklin
6474edb9ba
feat(types): add types for $eval (#6135)
This pulls in the types (based on the DefinitelyTyped repo) for
`page.$eval` (and the `$eval` method on other classes). The `$eval`
method is quite hard to type due to the way we wrap and unwrap
ElementHandles that are passed to / returned from the `pageFunction`
that users provide.

Longer term we can improve the types by providing type overloads as
DefinitelyTyped does but I've deferred that for now (see the `TODO` in
the code for more details).
2020-07-02 10:09:34 +01:00
Jack Franklin
28797dee41
chore: migrate tests to TypeScript (#6075)
This CL migrates all the tests to TypeScript. The main benefits of this is that we start consuming our TypeScript definitions and therefore find errors in them. The act of migrating found some bugs in our definitions and now we can be sure to avoid them going forwards.

You'll notice the addition of some `TODO`s in the code; I didn't want this CL to get any bigger than it already is but I intend to follow those up once this lands. It's mostly figuring out how to extend the `expect` types with our `toBeGolden` helpers and some other slight confusions with types that the tests exposed.

Co-authored-by: Mathias Bynens <mathias@qiwi.be>
2020-06-23 07:18:46 +02:00