2320 Commits

Author SHA1 Message Date
Pavel Feldman
a1df11011c
chore: split recorder into files (#32345) 2024-08-27 14:10:21 -07:00
Pavel Feldman
bc87467b25
chore: generate simple dom descriptions in codegen (#32333) 2024-08-27 11:52:14 -07:00
Pavel Feldman
177576a51b
chore: add simple dom util (#32332) 2024-08-26 16:28:40 -07:00
Pavel Feldman
6f55b57e5a
chore: move codegen into its own folder (#32330) 2024-08-26 15:24:02 -07:00
Pavel Feldman
4340d153df
chore: deprecate locator.frameLocator() (#32306) 2024-08-26 10:28:54 -07:00
Max Schmitt
67d3d5f203
fix(clock): don't throw for |null| or |undefined| callbacks (#32309)
Fixes https://github.com/microsoft/playwright/issues/32293

This aligns it how Chromium and other browsers are doing it.
2024-08-26 09:26:38 -07:00
Max Schmitt
596f497633
fix: don't throw error on about:blank when blocking ServiceWorker (#32310)
Fixes https://github.com/microsoft/playwright/issues/32292
2024-08-26 08:27:21 -07:00
Playwright Service
5acd2dbf48
feat(webkit): roll to r2065 (#32322)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-26 10:25:59 +02:00
Dmitry Gozman
abe6c04a54
chore: remove noWaitAfter from selectOption (#32283)
This follows removing this option from other methods in v1.46. The two
methods still supporting `noWaitAfter` are `click` and `press`.
2024-08-23 14:50:43 -07:00
Pavel Feldman
37eb66df10
chore: extract performAction in recorder (#32279) 2024-08-23 10:19:44 -07:00
Pavel Feldman
4edc076935
chore: load env from playwright.env when running codegen (#32280) 2024-08-23 10:19:36 -07:00
Max Schmitt
1b220c5289
chore: remove Chromium Windows proxy hacks (#31724)
Fixes https://github.com/microsoft/playwright/issues/17252
2024-08-23 15:17:00 +02:00
Dmitry Gozman
3a75f23ea1
fix(addInitScript): require non-undefined arg to trigger commonjs module (#32282) 2024-08-23 02:48:56 -07:00
Max Schmitt
16e76cb71a
fix(client-certificates): errors during http2 TLS handshake (#32258) 2024-08-22 15:13:54 +02:00
Dmitry Gozman
571f25a7d3
fix(role): hidden pseudos should not contribute to accessible name (#32251) 2024-08-21 11:14:41 -07:00
Dmitry Gozman
d5a7495041
feat(addInitScript): support cjs modules when passing both path and arg (#32240)
This works with scripts bundled by:
- `esbuild entrypoint.ts --bundle --format=cjs --outfile=injected.js`
- webpack with a typical config
  ```js
  module.exports = {
    entry: { 'injected': './entrypoint.js', },
    output: {
      path: require('path').resolve(__dirname),
      filename: '[name].js',
      libraryTarget: 'commonjs2',
    },
  };
  ```
2024-08-21 09:46:38 -07:00
Yury Semikhatsky
918dbe5e3a
chore: start listening for navigation events before navigation starts (#32237)
There is a chance in case of cross-process navigation that the
navigation event comes before `navigateFrame` finishes.
2024-08-21 08:34:55 -07:00
Pavel Feldman
109cab66f1
chore: extract recorder dialog into a class (#32233) 2024-08-20 10:56:55 -07:00
Dmitry Gozman
b4a9b247b4
fix(role): make sure to ignore style/script/noscript/template (#32231)
Even when these are a part of a hidden `aria-labelledby` traversal, all
browsers ignore them anyway.
2024-08-20 09:02:23 -07:00
Max Schmitt
010778f6c5
feat(client-certificates): allow passing certificates from memory (#32210) 2024-08-19 09:24:32 +02:00
Max Schmitt
faf4853259
chore: validate client-certificates on context creation (#32168) 2024-08-19 09:02:14 +02:00
Max Schmitt
743565ee3e
chore: generate self-signed certificates for socks proxy (#32192) 2024-08-16 20:21:05 +02:00
Playwright Service
e7b7c715b0
feat(chromium): roll to r1131 (#32174)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-15 20:41:27 +02:00
Max Schmitt
a1d32d997c
fix(client-certificates): improve close handling from target and proxy (#32158) 2024-08-15 10:21:10 +02:00
Max Schmitt
aac3a84321
fix(client-certificates): stall on tls handshake errors (#32163)
Extracted from https://github.com/microsoft/playwright/pull/32158.
2024-08-15 08:51:40 +02:00
Yury Semikhatsky
60900f8541
chore(webkit): add listeners directly without eventsHelper (#32149)
The listeners are never removed, so there is no point in wrapping them
with the helper
2024-08-14 08:38:49 -07:00
Max Schmitt
4daf5c2303
fix(client-certificates): when server does tls renegotiation (#32155)
Certain https servers like Microsoft IIS aka. TLS servers do the TLS
renegotiation after the TLS handshake. This ends up in two
`'secureConnect'` events due to an upstream Node.js bug:
https://github.com/nodejs/node/issues/54362

Drive-by: Move other listeners like `'close'` / `'end'` to `once()` as
well.

Relates https://github.com/microsoft/playwright/issues/32004
2024-08-14 15:11:29 +02:00
Dmitry Gozman
f8eef3897c
chore: move urlMatch to isomorphic (#32142)
To be reused in injected code.
2024-08-13 12:47:02 -07:00
Yury Semikhatsky
6cc53cfce6
chore: move output parsing to concrete browsers (#32129) 2024-08-13 12:20:41 -07:00
Yury Semikhatsky
a28f51a0f3
chore: use base BrowserType to reference browser types (#32125) 2024-08-12 22:20:58 -07:00
Kuba Janik
308381eeae
feat: allow URLSearchParams and string as params in APIRequestContext (#32120) 2024-08-12 14:22:03 -07:00
Max Schmitt
0d575b4ef6
chore: less 'as any' in html-reporter (#32117)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Simon Knott <info@simonknott.de>
2024-08-12 15:17:42 +02:00
Dmitry Gozman
a30a8805c9
fix(expect): account for timeout during the first locator handler check (#32095)
Also considered an alternative to not perform the locator handler check
during one-shot, but that would be somewhat against the promise of the
locator handler that is supposed to run **before** every expect check.

Fixes #32089.
2024-08-12 01:57:15 -07:00
Playwright Service
4d26036b7b
feat(webkit): roll to r2060 (#32082)
Reference: https://github.com/microsoft/playwright/pull/32108
2024-08-09 15:31:35 -07:00
Dmitry Gozman
9b3e0e5667
chore: simplify binding result dispatch (#32092)
We can now pass an Error object through evaluate.
2024-08-09 03:46:52 -07:00
Playwright Service
5cc1e7b299
feat(firefox): roll to r1462 (#32086)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-08 22:41:49 +02:00
Playwright Service
05732b50c8
feat(chromium): roll to r1130 (#32074)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-08 14:13:18 +02:00
faulpeltz
ca25d2c802
fix: ubuntu version detection for linux mint 22 (#32049)
Add Linux Mint 22 (Ubuntu based distro) version detection for dependency
installation
Linux Mint 22.x -> Ubuntu 24.04

(also see original Linux Mint support PR #28085)
2024-08-07 14:28:03 -07:00
Dmitry Gozman
ea747afcdd
chore: use a single binding for all Playwright needs (#32039)
This makes it easier to manage bindings, being just init scripts.
Fixes the BFCache binding problem.
Makes bindings removable in Firefox.

Fixes #31515.
2024-08-07 06:20:12 -07:00
Pavel Feldman
3c87f217df
feat(events): allow waiting for removeAllListeners (#31941) 2024-08-05 21:14:35 -07:00
Max Schmitt
613ccb8d5b
chore(client-certificates): rewrite error for unsupported PFX errors (#32008) 2024-08-05 14:42:29 +02:00
Max Schmitt
71e614dc5a
fix(client-certificates): report error to the browser if incorrect passphrase (#32007) 2024-08-05 10:54:33 +02:00
Max Schmitt
d0c840f639
fix(clock): mock time in Event.prototype.timeStamp (#31986)
Ideally we generate the timestamp when the Event gets created. This
patch adds a best-effort logic, since we can't override the constructor
of natively created events, e.g. `MouseEvent`.

Fixes https://github.com/microsoft/playwright/issues/31924
2024-08-02 15:27:54 +02:00
Max Schmitt
878a6a499b
chore: prefer executablePath for page.pause() (#31985)
Motivation: For scenarios where
[`findChromiumChannel`](f17de8222f/packages/playwright-core/src/server/registry/index.ts (L1016))
throws (no branded browser and no normal browser is installed) we were
[silently
catching](f17de8222f/packages/playwright-core/src/server/recorder.ts (L79))
when calling `page.pause()`.

This patch does not invoke `findChromiumChannel` when the
inspectedContext is Chromium based and has an `executablePath`
specified.

Note this was already fixed by #6214, but regressed since then.

Fixes https://github.com/microsoft/playwright/issues/31967
2024-08-02 11:18:51 +02:00
Max Schmitt
f17de8222f
chore: run client-certificate tests in service mode (#31973) 2024-08-02 08:34:28 +02:00
Yury Semikhatsky
db0980a850
chore(fetch): include response text into failOnStatusCode errors (#31978)
Fixes https://github.com/microsoft/playwright/issues/31834
2024-08-01 17:53:43 -07:00
Simon Knott
76cca7fc2c
fix(ui): only populate settings once (#31958)
We populate `localStorage` using an init script. Currently, this script
isn't just run for the UI though, but also for all iframes. So we're
resetting `localStorage` every time the UI loads an iframe.

This hasn't been a problem in the past, because the only consumer of
`localStorage`, `Settings`, only read from `localStorage` once and kept
most state in `useState` afterwards. With
https://github.com/microsoft/playwright/pull/31911, this is no longer
true, so the bug starts biting us!

The fix is to ensure the init script isn't run on iframes.
2024-08-01 17:28:48 +02:00
Playwright Service
6c6f10b678
feat(chromium): roll to r1129 (#31955)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-08-01 14:32:44 +02:00
Playwright Service
a83134b270
feat(ffmpeg): roll to r1010 (#31949) 2024-08-01 13:17:11 +02:00
Yury Semikhatsky
edb89dcb66
chore: make sure error stack includes message as before #31691 (#31934)
This brings stack formatting to how it was prior to
1686e5174d
so that the ports can use it.
2024-07-31 10:58:37 -07:00