Commit Graph

128 Commits

Author SHA1 Message Date
Dmitry Gozman 51a7b8f27f
test: unflake some network-tab related tests (#35574) 2025-04-10 15:18:34 +01:00
alscotty cb7f1121ee
feat(trace-viewer): add copy to clipboard button of snapshot url on hover (#35213) (#35255)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2025-03-28 14:39:29 +01:00
Dmitry Gozman 0467c28722
chore: builtins (#35197) 2025-03-25 13:49:28 +00:00
Dmitry Gozman 195fe11e1b
fix(trace viewer): preserve dialog.showModal() elements (#35231) 2025-03-17 14:57:43 +00:00
epszaw 02a63fe9e8
feat: add ability to render base64-encoded trace recieved from window messages (#34976) 2025-03-04 10:56:01 -08:00
Adam Gastineau c44590aa5b
chore: disable popover test on Darwin 13.7 WebKit (#34466) 2025-01-24 08:27:06 -08:00
Adam Gastineau 84bbc5fd35
feat(trace-viewer): Render context string for most actions (#34292) 2025-01-16 11:48:34 -08:00
Pavel Feldman 6179b5b1d7
chore: allow matching aria snapshot in trace viewer (#34302) 2025-01-11 10:14:21 -08:00
Andrey Lushnikov 4bb464197f
test: unflake a few trace-viewer tests (#34299) 2025-01-10 14:57:50 -08:00
Adam Gastineau ada68cd6f0
feat(trace-viewer): Add setting for display canvas content in snapshots (#34010) 2025-01-08 05:08:00 -08:00
Adam Gastineau 05472f5ef6
feat: Add time information to Call and Network tabs in Trace Viewer (#33935) 2024-12-20 05:01:16 -08:00
Rui Figueira c700a8405c
feat(trace-viewer): render iframe canvas in trace viewer (#33809) 2024-12-13 16:28:06 +01:00
Dmitry Gozman 7e09aa07de
feat(trace): preserve the open state of popovers (#33728) 2024-11-22 09:35:19 -08:00
Simon Knott 5e8b469c1c
fix(test): hide response.* calls from reports (#33620) 2024-11-18 13:59:40 +01:00
Simon Knott 25c039401d
fix(canvas snapshots): position mismatch in headless mode (#33575) 2024-11-14 15:27:09 +01:00
Dmitry Gozman 9b2ca93a50
chore: followup to tracing.group (#33450) 2024-11-05 04:45:54 -08:00
René fa10bcd5a3
feat(tracing) Adding groups to trace via pw-api (#33081)
Signed-off-by: René <snooz@posteo.de>
Signed-off-by: René <41592183+Snooz82@users.noreply.github.com>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-11-05 03:45:37 -08:00
Dmitry Gozman 1950bbdc6e
test: unflake "should not leak recorders" (#33264) 2024-10-24 02:47:34 -07:00
Dmitry Gozman 993a6b2a2a
fix(recorder): do not leak when instantiated in snapshots (#33240) 2024-10-23 10:24:53 -07:00
Simon Knott 3322a7f3bb
chore(trace): remove screenshot instead of snapshot code (#33225) 2024-10-23 12:17:02 +02:00
Simon Knott ef84051c91
feat(tracing): clip `canvas` contents from screenshots (#33119) 2024-10-22 14:12:25 +02:00
Rui Figueira b194d6a1e9
fix(recorder): fix recorder injected icons (#33198) 2024-10-22 12:44:18 +02:00
Dmitry Gozman 34ad67659f
test: remove some fixmes (#32953) 2024-10-04 08:22:27 -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
Dmitry Gozman face24dc66
test: unflake/skip a few tests (#32929) 2024-10-02 06:58:21 -07:00
Simon Knott 3a5bf1cc1d
fix(trace viewer): reveal stack for highlighted action (#32919)
Closes https://github.com/microsoft/playwright/issues/32915.

In the `Call` and `Logs` tabs, we update the contents based on the
hovered action. We document that this is also the case for the `Source`
tab:


78054a7652/docs/src/test-ui-mode-js.md?plain=1#L61-L65

But it isn't. Not sure if it's a regression or not, but this PR fixes
it.
2024-10-02 13:30:44 +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 0d79291604
chore: hide screenshot instead of snapshot Trace Viewer feature (#32832) 2024-09-26 22:30:41 +02:00
Pavel Feldman 0c8b2a7c32
chore: take snapshot tab apart (#32756) 2024-09-23 15:51:15 -07: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
Max Schmitt 7cd69beed2
test: unflake 'should properly synchronize local and remote time' test (#32733) 2024-09-20 20:21:57 +02:00
Pavel Feldman 2f4acbb001
chore: use contentFrame() as a canonical locator representation (#32697) 2024-09-18 20:15:01 -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 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 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
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
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
Simon Knott 0b9c036505
chore(ui): add test for font preview (#32225)
Adds a test for the font preview feature.
2024-08-22 17:56:07 +02:00
Dmitry Gozman 5271c26af1
fix(trace viewer): do not serve resources with x-unknown content type (#32219)
`x-unknown` is used as a placeholder for "no content-type" in the har.
We should not send it to the browser, because it is meaningfully
different from not sending `Content-Type` header. For example, Chromium
refuses to interpret stylesheets served with `x-unknown` content type.

Fixes https://github.com/microsoft/playwright-java/issues/1651.
2024-08-19 10:29:51 -07:00
Kuba Janik 7ec3a93db3
feat(ui-mode): add filters to network tab (#31956) 2024-08-06 14:52:35 -07:00
Max Schmitt dbc4bc84d6
fix(trace-viewer): popup snapshot utf-8 support (#32006) 2024-08-05 09:11:31 +02:00
Dmitry Gozman bbe252a3d7
fix(ui mode): api review feedback (#31952)
- Hide "Testing Options" as not ready.
- Update SettingsView margins.
- Include `page.route` and similar methods into "Show route actions".
2024-08-01 05:36:19 -07:00
Yury Semikhatsky 0217defab4
chore(trace-viewer): do not shrink metadata view (#31938)
Avoids the following effect:

![image](https://github.com/user-attachments/assets/694de773-acc0-4266-87f2-eab67a3c7ce2)
2024-07-31 16:37:16 -07:00
Simon Knott b06a95dd75
feat(trace viewer): show `baseURL` in Metadata pane (#31852)
Resolves https://github.com/microsoft/playwright/issues/31847 by adding
playwright config's `baseURL` value to the `context-options` trace
event, and showing that in the Trace Viewer.

Because the added property is optional, I didn't increment the trace
format version.

I've also considered pulling the `baseURL` from the existing
`browser.newContext` step to get around modifying the trace format, but
that felt pretty hacky.


https://github.com/user-attachments/assets/ecaef747-727d-4937-9ca3-1605ca9907b9

---------

Signed-off-by: Simon Knott <info@simonknott.de>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-07-25 17:14:46 +02:00
Dmitry Gozman d87cb7a303
feat(trace viewer): allow hiding route actions (#31726)
Adds a new settings tab above the actions list.

<img width="307" alt="settings tab"
src="https://github.com/user-attachments/assets/792212b7-e2fd-4a5c-8878-654e2e060505">

Toggling the "Show route actions" checkbox hides all route calls:
`continue`, `fulfill`, `fallback`, `abort` and `fetch`.

References #30970.
2024-07-22 11:34:34 -07:00
Yury Semikhatsky bef87849e3
chore: show error when opening newer trace with old viewer (#31781)
Reference: https://github.com/microsoft/playwright-java/issues/1617
2024-07-22 08:16:25 -07:00
Dmitry Gozman b535139b32
fix(trace viewer): library-only trace should not merge actions (#31768)
Without `wallTime`, actions are matched by `actionName:undefined` and
all actions with the same are merged.

Fixes #31764.
2024-07-19 11:18:22 -07:00
Max Schmitt d463d1f285
fix(snapshotter): allow rendering of & in STYLE tags (#31627)
Fixes https://github.com/microsoft/playwright/issues/31607
2024-07-15 17:33:22 +02:00
ryanrosello-og e36ebb6ede
feat(trace-viewer) add request urls for actions initiated via APIRequestContext (#31534) 2024-07-04 11:59:56 +02:00