3278 Commits

Author SHA1 Message Date
Playwright Service
02f8acce02
feat(chromium): roll to r1143 (#33163)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-18 11:34:39 +02:00
Playwright Service
58ef9e2e5f
feat(firefox-beta): roll to r1465 (#33170)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-18 11:34:28 +02:00
Pavel Feldman
29c84a33c3
chore: compute aria text consistently with the role accumulated text (#33157) 2024-10-17 17:06:18 -07:00
Pavel Feldman
94321fef1c
chore: implement locator.ariaSnapshot (#33125) 2024-10-15 18:47:26 -07:00
Pavel Feldman
b421bd8b0d
chore: add a basic snapshot generator test (#33123) 2024-10-15 15:21:45 -07:00
Pavel Feldman
4b1fbde2ad
chore: generate match snapshot (#33105) 2024-10-15 13:38:55 -07:00
Playwright Service
615f1dbd63
feat(chromium-tip-of-tree): roll to r1269 (#33117)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-15 17:51:57 +02:00
Dmitry Gozman
59a50cf596
fix(chromium): disable PlzDedicatedWorker again (#33110) 2024-10-15 02:13:19 -07:00
Dmitry Gozman
17837e564d
fix(routeWebSocket): make sure ws url without trailing slash is supported (#33095) 2024-10-15 02:08:27 -07:00
Dmitry Gozman
8a275e5a5b
docs: improve docs for WebSocketRoute (#33097) 2024-10-15 02:07:03 -07:00
Pavel Feldman
2c05d294a8
chore: fix webkit visibility check in aria matcher (#33102) 2024-10-14 15:55:21 -07:00
Pavel Feldman
a38ff6e0d8
chore: experimental toMatchAriaSnapshot (#33014) 2024-10-14 14:07:19 -07:00
Pavel Feldman
6cfcbe0d6d
chore: fix codegen selector while debugging (#33099)
Fixes #33052
2024-10-14 14:04:24 -07:00
Yury Semikhatsky
f8806d253d
chore(bidi): remove assertion from response dispatch (#33100)
After the context has been disposed we can't route any callbacks to it
because
it is not in the map, so the assertion doesn't make sense as it always
ends up in
the top level session.

Fixes the following error:
```
  pw:browser <closing ws> Closing websocket due to failed onmessage callback. eventData={"type":"success","id":32,"result":{}} e=Assertion error Error: Assertion error
  pw:browser     at assert (/home/yurys/playwright/packages/playwright-core/src/utils/debug.ts:21:11)
  pw:browser     at BidiSession.dispatchMessage (/home/yurys/playwright/packages/playwright-core/src/server/bidi/bidiConnection.ts:229:13)
  pw:browser     at BidiConnection.call [as _dispatchMessage] (/home/yurys/playwright/packages/playwright-core/src/server/bidi/bidiConnection.ts:93:25)
```
2024-10-14 13:25:30 -07:00
Playwright Service
c7fbeddaf4
feat(webkit): roll to r2092 (#33078) 2024-10-14 22:21:49 +02:00
Simon Knott
a8df750a48
fix(har): account for reused sockets (#33087)
Closes https://github.com/microsoft/playwright/issues/32960

If the socket is reused, the connect and DNS timings are set to -1,
because that timing doesn't apply to the current request. The time
between request start and the socket being free is counted as `blocked`.
2024-10-14 17:22:29 +02:00
Fumiaki MATSUSHIMA
0a63427c77
fix(codegen): fix unselect issue (#33076) 2024-10-13 13:16:01 +02:00
Playwright Service
699f51b227
feat(webkit): roll to r2091 (#33070) 2024-10-11 17:18:06 -07:00
Playwright Service
e4b0d5e6dd
feat(chromium): roll to r1142 (#33062)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-11 16:33:59 +02:00
Max Schmitt
87624c5434
Revert "fix(codegen): fix unselect issue (#32127)" (#33065)
This reverts commit 5121b19ac618432c9203282c07d8448b4889869d.

The tree is red and fixing seems non-trivial.

Closes https://github.com/microsoft/playwright/issues/33064
Closes https://github.com/microsoft/playwright/pull/33060
2024-10-11 16:33:17 +02:00
Yury Semikhatsky
b9cce598dd
fix(screenshot): show image diff inline in errors list (#32997)
The diff is now shown inline in the errors list.

There are 2 possible failures of toHaveScreenshot
* Previous and actual snapshot mismatch. In this case html report will
show diff between Actual/Previous and have Expected as a separate
screenshot.
* Actual/Previous are equal but they differ from the expected. In this
case html report only contains Actual/Expected images and the diff.

Reference: https://github.com/microsoft/playwright/issues/32341

<img width="1039" alt="image"
src="https://github.com/user-attachments/assets/b458f986-cc25-4721-862c-0cc2c1b01a42">
2024-10-10 16:49:17 -07:00
Playwright Service
10a9e1c730
feat(webkit): roll to r2090 (#33050) 2024-10-11 00:08:03 +02:00
Yury Semikhatsky
82fe882004
fix(webkit): scroll mobile page with background-attachment: fixed (#33048)
Fixes #31551
Fixes #23573
2024-10-10 14:32:27 -07:00
Playwright Service
7de084b6dc
feat(chromium-tip-of-tree): roll to r1268 (#33042)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-10 16:32:00 +02:00
Playwright Service
217b57df4c
feat(webkit): roll to r2089 (#33039)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-10 13:10:54 +02:00
Playwright Service
bc30cc795e
feat(chromium): roll to r1141 (#33027)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-09 14:55:37 +02:00
Fumiaki MATSUSHIMA
5121b19ac6
fix(codegen): fix unselect issue (#32127)
Fixes https://github.com/microsoft/playwright/issues/31290
2024-10-08 11:38:52 -07:00
Simon Knott
042161e1ce
Reapply "fix(har timing): record connect timing for proxied connections" (#32855) (#33003)
This reapplies what we reverted in
https://github.com/microsoft/playwright/pull/32989.

Max and me debugged this, and found that the test failures come from
SOCKS proxy now preferring IPv6 over IPv4. We've updated the tests and
made sure that this doesn't mask any breaking change.

I'm enabling CQ1 to make sure we don't oversee any other CI failures.
2024-10-08 14:17:50 +02:00
Playwright Service
992994f036
feat(chromium-tip-of-tree): roll to r1267 (#33007)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-08 14:13:45 +02:00
Dmitry Gozman
0f2cbdedac
fix(routeWebSocket): do not show in the trace (#32991) 2024-10-08 02:47:24 -07:00
Simon Knott
1b589c4bd3
Revert "fix(har timing): record connect timing for proxied connections" (#32989)
Reverts microsoft/playwright#32855. This broke two tests on main, and we
don't yet know how to fix it other than downgrading.
2024-10-08 10:13:21 +02:00
Pavel Feldman
7047c3a6c6
fix(codegen): do not codegen non-existing fixtures (#32993)
Closes https://github.com/microsoft/playwright/issues/32981
2024-10-07 17:12:36 -07:00
Aaron Sherwood
4d13677ebd
chore: add Devuan OS fallback to Debian (#32990) 2024-10-07 23:24:18 +02:00
Yury Semikhatsky
4fe33db392
docs(route): header override propagation (#32971)
Fix https://github.com/microsoft/playwright/issues/32939
2024-10-07 13:52:55 -07:00
Simon Knott
9a6f03eb87
fix(fetch): listener leaks on Socket (#32956)
Closes https://github.com/microsoft/playwright/issues/32951

`node:http` reuses TCP Sockets under the hood. We weren't cleaning up
our listeners, leading to the `MaxListenersExceededWarning`.

This PR adds cleanup logic. It also raises the warning threshhold, so
that it doesn't trigger until there's 100 concurrent requests over the
same socket.
2024-10-07 18:43:25 +02:00
Simon Knott
d3fbf1aaeb
fix(clock): amend setSystemTime docs (#32901)
As discussed yesterday over
https://github.com/microsoft/playwright/issues/32807. Adds some words to
differentiate `setSystemTime` from `setFixedTime`.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-07 12:12:12 +02:00
Simon Knott
de4a4d1ce1
fix(har timing): record connect timing for proxied connections (#32855)
Fixes a bug discovered in
https://github.com/microsoft/playwright/pull/32647. When using http
proxy, the `connect` event isn't emitted so we don't populate
`tcpConnectionAt`. The updated version of `https-proxy-agent` emits a
`proxyConnect` as a replacement, so this PR updates and listens to that
event.
For socks proxies, the `on("socket")` event is emitted once the SOCKS
connection is established, which is the equivalent of having a TCP
connection available.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-10-07 09:59:13 +02:00
Dmitry Gozman
9f842da8b3
fix: throw when element handle is detached while waiting for selector (#32961) 2024-10-04 08:23:25 -07:00
Simon Knott
40670e6ffd
fix(emulate media): document "no-preference" as deprecated (#32881)
Closes https://github.com/microsoft/playwright/issues/32862.

`prefers-color-scheme: no-preference` was removed from browsers. This PR
marks it as deprecated in our docs and removes all mentions.

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-10-04 16:49:32 +02:00
Dmitry Gozman
84b4fd4e40
feat: wait for pending navigation to resolve before many actions (#32899)
This includes all actions that perform locator handler check.
    
Note this makes it impossible to interact with the page while a main
frame navigation is ongoing. This was already the case for Chromium, but
now WebKit and Firefox align with it.

Setting `PLAYWRIGHT_SKIP_NAVIGATION_CHECK` environment variable disables
this behavior.
2024-10-04 07:25:18 -07:00
Dmitry Gozman
10d6812058
chore: clear pendingDocument() for the same-document navigation (#32954)
WebKit notifies about a pending same-document navigation through
`Page.frameScheduledNavigation`, and committing it should clear the
`pendingDocument()`.

Extracted from #32899.
2024-10-04 04:54:56 -07:00
Playwright Service
0a45549533
feat(chromium): roll to r1140 (#32949)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-04 11:14:08 +02:00
Dmitry Gozman
6b1d0361cd
fix(chromium): reset mouse position upon page reuse (#32944)
Similarly to Firefox, move the mouse to (-1, -1) upon page reuse. This
fixes the corresponding test on all platforms.
2024-10-03 08:09:00 -07:00
Playwright Service
076a6e84a1
feat(chromium-tip-of-tree): roll to r1266 (#32942)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-03 16:03:30 +02:00
Dmitry Gozman
0ffac886e8
test: fix android tests (#32932)
One test is removed, since it's impossible to fix. Hopefully, the rest
will pass.
2024-10-03 03:37:43 -07:00
Dmitry Gozman
3c5967d4f5
fix(trace viewer): clear old highlighted elements upon change (#32917)
When the list of highlighted elements changes over time, we should
update the elements marked as `__playwright_target__` in the snapshot.

A good example is an `expect(locator).toHaveText([...])` where the list
of elements changes from 4 items to 3 after clicking a "Delete" button.
2024-10-02 23:48:26 -07:00
Playwright Service
616425a0fb
feat(firefox): roll to r1465 (#32938) 2024-10-03 08:25:44 +02:00
Playwright Service
0fd9452127
feat(webkit): roll to r2084 (#32912)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-10-02 09:02:32 +02:00
Dmitry Gozman
773202867d
feat(trace): highlight strict mode violation elements in the snapshot (#32893)
This is fixing a case where the test failed with strict mode violation,
but all the matched elements are not highlighted in the trace.

For example, all the buttons will be highlighted when the following line
fails due to strict mode violation:
```ts
await page.locator('button').click();
```

To achieve this, we mark elements during `querySelector` phase instead
of inside `onBeforeInputAction`. This allows us to only mark from inside
the `InjectedScript` and remove the other way of marking from inside the
`Snapshotter`.
2024-10-02 00:00:45 -07:00
Max Schmitt
daac0ddd24
fix(fetch): fallback to given URL if baseURL is invalid (#32911) 2024-10-01 22:43:32 +02:00