866 Commits

Author SHA1 Message Date
Pavel Feldman
0c8b2a7c32
chore: take snapshot tab apart (#32756) 2024-09-23 15:51:15 -07:00
Yury Semikhatsky
11320d34c6
Revert chore: ignore third-party execution contexts (#32437) (#32771)
Partially revert #32437 and add a test that console.log() messages from
content scripts are properly reported

Fixes https://github.com/microsoft/playwright/issues/32762
2024-09-23 15:48:11 -07:00
Max Schmitt
0ee9a82926
test: skip 'should work with error after successful open' on WebKit Windows (#32769) 2024-09-23 23:31:04 +02:00
Dmitry Gozman
b3a82bef46
feat: do not record route calls in the trace (#32723)
These are represented in the network pane instead.
2024-09-21 10:17:59 -07:00
Pavel Feldman
418d1c0c55
chore: allow starting recorder in traceviewer (#32741) 2024-09-20 15:25:49 -07:00
Max Schmitt
7cd69beed2
test: unflake 'should properly synchronize local and remote time' test (#32733) 2024-09-20 20:21:57 +02:00
Playwright Service
33890eb6c5
feat(webkit): roll to r2080 (#32721)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-09-20 08:28:46 -07:00
Dmitry Gozman
cdcaa7fab6
feat: routeWebSocket (#32675)
This introduces `WebSocketRoute` class and
`page/context.routeWebSocket()` methods.
2024-09-20 03:20:06 -07:00
Pavel Feldman
01b44ba077
chore: remove PWTEST_RECORDER_PORT as it was ignored (#32717) 2024-09-19 13:35:52 -07:00
Pavel Feldman
a00e1c9c4b
chore: make recorder tests match order of codegen calls (#32716) 2024-09-19 10:31:44 -07:00
Dmitry Gozman
5089d9f293
fix(chromium): disable ThirdPartyStoragePartitioning (#32701)
See
https://developers.google.com/privacy-sandbox/cookies/storage-partitioning
for more details.

References #32230.
2024-09-19 03:12:21 -07:00
Max Schmitt
61cbca6695
test: fix client-certificate tests (#32691) 2024-09-19 12:03:05 +02:00
Pavel Feldman
2f4acbb001
chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -07:00
Pavel Feldman
790dbfd78f
fix(codegen): use content_frame property in python (#32699) 2024-09-18 19:11:14 -07:00
Max Schmitt
d4eecafa8a
test: listen always on 127.0.0.1 for client certificate tests (#32677) 2024-09-18 17:09:08 +02:00
Max Schmitt
ec3db20743
test: fix toolbar hydration test under frozen suite (#32684) 2024-09-18 15:35:33 +02:00
Simon Knott
825df6c074
feat(har): record serverIPAddress for API requests (#32660)
Discovered working on
https://github.com/microsoft/playwright/pull/32658. We're recording the
remote server address for browser requests, but not for API requests.
This PR adds that for API requests.
2024-09-18 14:51:42 +02:00
Max Schmitt
9fc195bff5
test: update cookie expectations for macOS 15 (#32674) 2024-09-18 11:08:17 +02:00
Simon Knott
4460c98710
fix(har tracing): record response.bodySize for API requests (#32656)
A small drive-by that came out of working on
https://github.com/microsoft/playwright/issues/32653.
2024-09-18 08:21:10 +02:00
Simon Knott
8a97050822
feat(har): record securityDetails for API Requests (#32664)
While working on https://github.com/microsoft/playwright/pull/32658 I
discovered that we're recording `securityDetails` for browser requests,
but not for API requests. This PR fixes that.
2024-09-18 08:18:47 +02:00
Pavel Feldman
355c88f48f
chore: iterate towards recording into trace (#32646) 2024-09-17 18:26:44 -07:00
Yury Semikhatsky
ad70e7a783
fix(trace-viewer): time delta between local and remote actions (#32661) 2024-09-17 11:14:15 -07:00
Simon Knott
f1390cc269
chore(har recorder): ensure we respect minimal mode (#32658)
Closes https://github.com/microsoft/playwright/issues/32653.

Adds some test coverage to ensure we respect minimal mode for API
Requests in HAR tracing.

| omit setting | result |
| - | - |
| `omitCookies` |  added test for it |
| `omitTiming` | already covered |
| `omitSecurityDetails` | not recorded yet |
| `omitServerIP` | we don't record it yet, so no action here. gonna open
a separate issue |
| `omitPages` | not relevant to API requests |
| `omitSizes` | added test for it |
| `omitScripts` | not relevant to API requests |
2024-09-17 19:59:44 +02:00
Simon Knott
751b939d3a
feat(fetch): record timings (#32613)
Related to https://github.com/microsoft/playwright/issues/19621

Adds some instrumentation to collect timings for `APIRequestContext`
requests and adds them to the HAR trace. Doesn't yet expose them via an
API, but makes our `Duration` field in the trace viewer show a nice
duration:

<img width="1392" alt="Screenshot 2024-09-14 at 11 46 04"
src="https://github.com/user-attachments/assets/8020382d-9494-4634-9cfd-22b6f4a1d770">


I'm gonna add it to our API in a separate PR.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-09-17 16:11:21 +02:00
Simon Knott
f6219e6e79
Revert "feat(tracing): add .pwtrace to trace file extension" (#32648)
Reverts microsoft/playwright#32581
Relates
https://github.com/microsoft/playwright/issues/32226#issuecomment-2351164727
2024-09-17 15:32:30 +02:00
Simon Knott
b0f15b320f
fix(recorder): reattach toolbar if it was unmounted by framework hydration (#32637)
Closes https://github.com/microsoft/playwright/issues/32632. A side
effect of Remix's hydration implementation is that it throws away the
entire DOM. This is broadly discussed in
https://github.com/remix-run/remix/issues/4822 - there might be a fix in
coming React versions, but who knows.
Besides breaking browser extensions, this also deletes our toolbar!
This PR fixes it by periodically checking in on `x-pw-glass`, and
remounting it if it was unmounted. Hacky but effective!
2024-09-17 08:37:49 +02:00
Pavel Feldman
6dbde62a6b
chore: simplify signal handling while recording (#32624) 2024-09-16 14:39:36 -07:00
Max Schmitt
21d162c945
feat(client-certificates): add support for proxies (#32611)
Fixes https://github.com/microsoft/playwright/issues/32370
2024-09-16 17:57:33 +02:00
Simon Knott
aeb4d182f7
feat(tracing): add .pwtrace to trace file extension (#32581)
Closes https://github.com/microsoft/playwright/issues/32226

I've updated every mention of `.trace.zip` except for the release notes.
2024-09-14 10:17:07 +02:00
Max Schmitt
79cba7d704
chore: introduce option overrides on context/browser (#32606) 2024-09-13 17:34:34 +02:00
Simon Knott
48c7fb6b06
feat(library): accept FormData in fetch (#32602)
Closes https://github.com/microsoft/playwright/issues/26520 by accepting
`FormData`, which became stable in Node.js in v21.
2024-09-13 13:21:02 +02:00
Pavel Feldman
d051495c7a
chore: perform double click while recording (#32576) 2024-09-12 11:40:44 -07:00
Max Schmitt
8e82f53ceb
test: unskip various proxy tests (#32595)
Unskipping of various tests and revert the rest of
https://github.com/microsoft/playwright/pull/6350 since the upstream bug
has been fixed.
2024-09-12 20:31:22 +02:00
Dmitry Gozman
7335fa602c
fix(trace viewer): do not show multiple action points in iframes (#32537)
When action has an input target, we assume there is a target element in
one of the frames and show action point in its center.

Fixes #32453.
2024-09-11 03:04:03 -07:00
Simon Knott
cc9c4cdd9a
chore: fix flaky screenshot test (#32517)
In this test, the trace recording goes super fast. Sometimes, this means
that the recording is finished before the screen recorder got a chance
to take a screenshot. If that happens, the tests fail because we never
show a screenshot.
This PR fixes the flakiness by delaying the trace recording so that
there's always a screenshot taken.
2024-09-09 14:00:38 +02:00
Yury Semikhatsky
a113553f14
test: allow running oopif test without newBrowserCDPSession (#32496) 2024-09-06 13:49:37 -07:00
Yury Semikhatsky
d85527e9f6
test: some tests for expected API behavior (#32495)
Adding some tests discussed in
https://github.com/microsoft/playwright/pull/32434
2024-09-06 13:13:44 -07:00
Simon Knott
3fe1263643
feat(trace viewer): show Screenshot instead of Snapshot (#32248)
Closes https://github.com/microsoft/playwright/issues/23964.

Trace snapshots are a best-effort snapshots of the browser DOM, but we
can't guarantee them to be exactly what the browser showed. One example
of this is `canvas` elements, where you just can't see their contents.
That makes snapshots useful, but not perfect.

For those cases where the snapshot doesn't show everything, this PR
introduces a new setting to show a screenshot instead. You won't be able
to scroll or inspect the DOM or select a locator anymore. But if the
snapshot was missing something, or displaying something wrong, you can
now check the screenshot instead.
2024-09-06 16:24:33 +02:00
Yury Semikhatsky
f0e13164d7
chore: split firefox and chromium bidi implementations (#32478) 2024-09-05 18:31:56 -07:00
Yury Semikhatsky
9a2c60a77c
chore: identify largest gaps in Bidi API (#32434)
This pull request introduces initial support for the WebDriver BiDi
protocol in Playwright. The primary goal of this PR is not to fully
implement BiDi but to experiment with the current state of the
specification and its implementation. We aim to identify the biggest
gaps and challenges that need to be addressed before considering BiDi as
the main protocol for Playwright.
2024-09-04 11:36:52 -07:00
Playwright Service
d61b207ce3
feat(webkit): roll to r2066 (#32343)
Fixes https://github.com/microsoft/playwright/issues/30305

---------

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2024-08-28 08:23:39 -07:00
Pavel Feldman
bc87467b25
chore: generate simple dom descriptions in codegen (#32333) 2024-08-27 11:52:14 -07:00
Yury Semikhatsky
3f085d5689
chore: remove same-site expectations for old browsers (#32334) 2024-08-26 18:41:58 -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
54709880c2
test: update Modernizir expectations (#32308)
Looks like `hiddenscroll` was different when an external monitor was
connected.
2024-08-26 08:32:22 -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
Max Schmitt
54c487c939 test: unskip 'should use ipv6 proxy' for Docker 2024-08-24 11:49:18 +02:00
Max Schmitt
0d4d5758c4
test: update Modernizer tests to Safari 18 (#32290)
Fixes https://github.com/microsoft/playwright/issues/32288

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-08-23 16:59:55 +02: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