Commit graph

960 commits

Author SHA1 Message Date
Yury Semikhatsky a128dda84e
feat(webkit): roll to r1691 (#16000) 2022-07-27 16:39:01 -07:00
Dmitry Gozman 607910f6aa
fix(isVisible): do not retarget visibility checks (#16002)
We used to go to the enclosing button (inherited from click logic), which is unexpected.
2022-07-27 14:02:35 -07:00
Eran Rom 68d558f896
chore(default context): Apply context workaround only when browser and scenario match (#15904) 2022-07-27 12:23:22 -07:00
Playwright Service 3d82a6bf09
feat(chromium-tip-of-tree): roll to r1028 (#15991)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-27 16:05:30 +02:00
Dmitry Gozman 09461f8a76
fix(driver): make sure IpcTransport messages arrive in different tasks (#15978) 2022-07-26 18:42:02 -07:00
Playwright Service ac480240bb
feat(webkit): roll to r1689 (#15943) 2022-07-26 08:48:18 -07:00
Andrey Lushnikov a5738998f6
fix: accomodate to changed MSEdge download format (#15933)
Fixes #15932
2022-07-25 16:55:24 -07:00
Dmitry Gozman c4dae2a628
fix(cli): remove --save-trace from open command (#15905) 2022-07-25 09:16:20 -07:00
Dmitry Gozman 4bec6309df
fix(lifecycle): recalculate lifecycle on iframe detach (#15812)
It could be that iframe was blocking some event, like load or networkidle,
and we never updated the lifecycle after the iframe was detached. This
lead to goto and other navigation commands to never resolve.
2022-07-22 19:44:02 -07:00
Dmitry Gozman fd21852b01
fix(text selector): ignore NOSCRIPT elements (#15887)
These are usually not rendered, and some sites have very big content inside,
for example full page markup.
2022-07-22 16:18:06 -07:00
Playwright Service e6461270e5
feat(chromium-tip-of-tree): roll to r1027 (#15851)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-21 23:21:53 +02:00
Playwright Service 7d29231177
feat(chromium): roll to r1016 (#15857)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-21 23:19:26 +02:00
Dmitry Gozman ba3c8ffa5c
test: make sure browser crashes in CLI tests are marked as such (#15821) 2022-07-20 15:32:57 -07:00
Playwright Service b117ad826c
feat(webkit): roll to r1685 (#15811)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-20 19:21:28 +02:00
Playwright Service 919bf1f805
feat(chromium-tip-of-tree): roll to r1026 (#15795)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-07-19 23:20:37 +02:00
Playwright Service ef84df9fc4
feat(chromium-tip-of-tree): roll to r1025 (#15674)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-18 22:44:39 +02:00
Max Schmitt 507e921371
chore: bump 'ip' peer dependency (#15750) 2022-07-18 20:04:26 +02:00
Dmitry Gozman 212d4d6b09
feat(webkit): roll to 1683 (#15720) 2022-07-15 10:51:42 -07:00
Pavel Feldman 55cd3928b7
chore: reuse context in the innerloop mode (#15719) 2022-07-15 10:36:36 -07:00
Pavel Feldman a198b6d753
chore: reparent context objects into the object (#15689) 2022-07-15 08:56:47 -07:00
Ross Wollman 732b8f4760
chore: PW_EXPERIMENTAL_SERVICE_WORKER_NETWORK_EVENTS and doc clarifications (#15688) 2022-07-14 17:40:22 -07:00
Andrey Lushnikov 0a01a9456a
chore: update WebKit browser version (#15679)
As of July 14, 2022, Safari Technoly Preview returns the following:

```
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15
```
2022-07-14 13:56:20 -07:00
Andrey Lushnikov 173ea04b02
fix: add missing gstreamer dependencies for wk on debian 11 (#15675) 2022-07-14 13:12:49 -07:00
Max Schmitt 4bba41ab8f
Revert "feat(matchers): add toContainClass (#15491)" (#15670)
This reverts commit e4debd0bf6.
2022-07-14 22:03:37 +02:00
Andrey Lushnikov 53118c074e
chore: use JHBuild WebKit Debian 11 build (#15673)
Fixes #3167
2022-07-14 12:54:43 -07:00
Andrey Lushnikov df9beb4045
chore: cut v1.24 (#15654) 2022-07-14 09:42:40 -07:00
Yury Semikhatsky e37514b43c
docs: dragAndDrop source/target descriptions (#15658) 2022-07-14 09:42:26 -07:00
Yury Semikhatsky cb81d23ad6
fix(selectors): max hasText regex against nested nodes (#15638) 2022-07-14 08:23:11 -07:00
Playwright Service 0ac893d0f8
feat(chromium): roll to r1015 (#15649)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-14 14:34:02 +02:00
Playwright Service 6d67c5dd76
feat(chromium-tip-of-tree): roll to r1024 (#15581)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-13 18:04:24 +02:00
Andrey Lushnikov 83e3dbb1bb
chore: add support for debian 11 downloads (#15596) 2022-07-13 04:09:24 -07:00
Max Schmitt ee7d60fcee
docs: migrate page actions to locator actions 2/n (#15603) 2022-07-13 11:50:18 +02:00
Yury Semikhatsky 3436e64b75
feat: dispatch wheel event (#15593) 2022-07-12 17:17:45 -07:00
Pavel Feldman 3939b9f36e
chore: migrate component testing to server-side page reuse (#15477) 2022-07-12 14:30:24 -07:00
Max Schmitt e4debd0bf6
feat(matchers): add toContainClass (#15491) 2022-07-12 23:17:10 +02:00
Yury Semikhatsky 008a85b143
feat(webkit): roll to r1681 (#15577) 2022-07-12 14:07:56 -07:00
Ross Wollman 8858162692
fix: Service Workers+Interception: missing page-level Network events (#15549)
Fixes #15474.

Notes:

* page-level requests that are also handled by a SW's fetch handler, should not be interceptable at the page-level
* `Network.requestWillBeSent` does not provide enough metadata for Playwright to fire the `request` event at that time, so it does it as soon as it gets to the end of the request lifecycle
2022-07-12 13:23:35 -07:00
Pavel Feldman 8402001c32
chore: remove joining emitter (#15588) 2022-07-12 13:04:20 -07:00
Max Schmitt 7e1801bd30
fix(matchers): repeating values lead to no error (#15559) 2022-07-12 20:03:27 +02:00
jfp1992 7b881cf0fe
docs: fix typo bonding > bounding (#15442)
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-07-11 22:13:06 +02:00
Pavel Feldman 5fc637e44a
chore: experimental resetForReuse (#15432) 2022-07-11 13:10:08 -07:00
Yury Semikhatsky 2850aae924
fix(webkit): use new protocol methods for bindings (#15503) 2022-07-08 15:11:29 -07:00
Yury Semikhatsky b9d1a5ad69
feat(webkit): roll to r1677 (#15500) 2022-07-08 13:15:57 -07:00
Yury Semikhatsky 5f42725358
feat(webkit): roll to r1674 (#15384)
Also reverted screenshot test changes from 4de14e7 as the breaking change was reverted upstream in Revert [251706@main] getComputedStyle(img).height returns string of a rounded int not a float WebKit/WebKit#1902
2022-07-08 11:07:06 -07:00
Playwright Service dfd6fa356a
feat(chromium): roll to r1014 (#15490)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-08 13:41:21 +02:00
Pavel Feldman 0781d04a5e
chore: get rid of page state overrides (#15470) 2022-07-07 16:28:20 -07:00
Pavel Feldman 5fd6ce4de0
chore: allow aborting in-flight routes on context reuse (#15460) 2022-07-07 13:07:09 -07:00
Max Schmitt 86a65a03e4
chore: add CI to default user agent (#15450) 2022-07-07 21:43:47 +02:00
Pavel Feldman cc6f415933
chore: share grant permissions init among browser types (#15457) 2022-07-07 11:39:05 -07:00
Playwright Service adf03eaa4c
feat(chromium-tip-of-tree): roll to r1023 (#15447)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-07-07 19:21:58 +02:00
Playwright Service b7e66d2b14
feat(firefox): roll to r1335 (#15434)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-07 05:51:41 -07:00
Playwright Service 72c3574943
feat(firefox-beta): roll to r1335 (#15433)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-07-07 05:49:40 -07:00
Pavel Feldman f71b620de7
chore: unregister handlers when dispatcher goes (#15425) 2022-07-06 20:32:31 -07:00
Pavel Feldman b9e41df0a5
chore: respect event name in removeAllListeners (#15430) 2022-07-06 15:04:27 -07:00
Andrey Lushnikov e9d66535ba
browser(firefox): move screenshots to browser-side (#15230)
* `clip` option is always passed from the client code
* with this change, we can no longer capture screenshot of a blinking
  caret; the browser-side API doesn't have this capability.
2022-07-06 15:02:48 -07:00
Dmitry Gozman 0142bdce76
test: mark driver mode as remote (#15402)
Otherwise we are passing buffers as objects, not as base64.
2022-07-06 09:20:07 -07:00
Playwright Service 26ef9dddb3
feat(firefox): roll to r1334 (#15399)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-06 04:19:22 -07:00
Playwright Service 22b82a5dd0
feat(firefox-beta): roll to r1334 (#15403)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-06 04:17:58 -07:00
Dmitry Gozman d60b8aba23
fix(codegen): handle more context options (#15319)
The following options now work across languages:
- `recordHar`
- `serviceWorkers`

In addition, object properties are now sorted alphabetically.
Drive-by: fixed `--target` help message to include all available targets.
2022-07-05 13:30:46 -07:00
Ross Wollman 5f03bd9477
chore(test-runner): increase jpeg-js max mem allowance (#15381)
Resolves #14255.

PNGs should be preferred as they are deterministic, but increasing this
limit should be fine for JPEG users. (Looking through jpeg-js source code, the actual memory allocation is based on the size of the image—so unless a user is hitting this limit already—this should not impact the memory consumption of Playwright.
2022-07-05 13:25:54 -07:00
Playwright Service 449b66591d
feat(firefox): roll to r1333 (#15382)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-05 12:16:56 -07:00
Dmitry Gozman 4eccb89a79
chore: do not serialize buffers into base64 in local mode (#15316) 2022-07-05 08:58:34 -07:00
Sean Doyle ef5a56ce18
feat(evaluate): serialized URL instances (#15023)
Add support for returning [URL][] instances from `page.evaluate` calls.
Follow the patterns established by `Date` and `RegExp` serialization.

[URL]: https://developer.mozilla.org/en-US/docs/Web/API/URL
2022-07-05 17:53:02 +02:00
Max Schmitt 35a2792bb4
fix(html-report): listen on 127.0.0.1 only (#15361)
Fixes #11568
2022-07-05 08:48:30 -07:00
Maël Nison 7609785d53
fix: Detects React 17+ first (#15343) 2022-07-05 07:49:31 -07:00
Pavel Feldman 9e62cc4da9
fix(test): speculative attempt to fix trace viewer test flakiness (3) (#15342) 2022-07-03 11:55:18 -07:00
Dmitry Gozman 71dcad3b2e
test: fix some flaky failures (#15314)
- Never use open shadow root for highlight. This messes up
  our selectors that accidentally match internal preview elements.
- Remove failing electron test that we do not care about.
- Skip `channels.spec.ts` in non-default mode.
2022-07-01 13:57:33 -07:00
Ross Wollman 6cb3236acd
feat(chromium): Service Worker Network Instrumentation and Inspection (#14716)
Adds Chromium support for Service Worker Networking (interception/routing, Request/Response events, and HAR).

Resolves #1090.
Depends on #14714 and #14714.
Supercedes #14321.
Follow up #14711.

Landed upstream patches:
- https://chromium-review.googlesource.com/c/chromium/src/+/3510917
- https://chromium-review.googlesource.com/c/chromium/src/+/3526571
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3566669
- https://chromium-review.googlesource.com/c/chromium/src/+/3544685
- https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3610924
- https://chromium-review.googlesource.com/c/chromium/src/+/3689949
2022-07-01 12:49:43 -07:00
Dmitry Gozman 82032be368
chore(server): validate/convert protocol both ways (#14811)
Previously, we only validated/converted on the way to the server,
but not from the server.

Validating both ways catches issues earlier, and allows us to
perform automatic conversions, for example only converting
buffers to base64 when sending over wire.
2022-07-01 09:58:07 -07:00
Playwright Service 3e86c7af95
feat(chromium): roll to r1013 (#15303)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 15:18:58 +02:00
Playwright Service 64e6688e84
feat(firefox-beta): roll to r1333 (#15292)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 05:24:30 -07:00
Playwright Service 2e96db4655
feat(firefox): roll to r1332 (#15291)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-07-01 05:24:10 -07:00
Pavel Feldman 6425ab9e78
fix(ff): allow more time to launch browser (#15290) 2022-06-30 18:07:25 -07:00
Max Schmitt 3d1d723c56
fix(esm): show codeframe when errors get reported (#15262) 2022-06-30 21:17:08 +02:00
Yury Semikhatsky 4de14e7d2c
feat(webkit): roll to r1673 (#15276) 2022-06-30 12:07:33 -07:00
Dmitry Gozman 0254cd3be7
fix(firefox): launch races (#15259)
Potential fixes to avoid startup races:
- Wait for "juggler listening" message.
- Make sure `transport.onclose` is called when connecting to the transport after the actual pipe closure.
2022-06-30 10:58:22 -07:00
Max Schmitt 71fc53bbf8
fix(matchers): toHaveClass on SVG elements (#15267)
Fixes #15260
2022-06-30 07:01:26 -07:00
Ross Wollman 9cafab382b
docs: clarify use of browser.close (#15255) 2022-06-29 18:41:21 -07:00
Dmitry Gozman ff2647cfa3
fix(network): remove races from sizes calculation (#15208)
- Do not resolve raw headers upon `loadingFinished`, since they may still come later in
  `responseReceivedExtraInfo`.
- Introduce separate promises for `encodedBodySize`, `transferSize` and `responseHeadersSize`.
- Make sure we resolve each of them either with data available
  from the browser, or a fallback calculation.
- Set raw response headers for redirects on WebKit.
- Do not stall on cached responses in Chromium, they have erroneously set `hasExtraInfo` flag.
- Use `transferSize` that is available in Firefox protocol.
2022-06-29 18:11:22 -07:00
Max Schmitt b3c31f5b13
fix: do not throw on removeListener without listener (#15224)
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-06-29 13:53:13 +02:00
Playwright Service b554344907
feat(chromium-tip-of-tree): roll to r1019 (#15172)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-29 13:29:28 +02:00
Dmitry Gozman 8220ab1379
feat(firefox): roll ff 1328 and ff-beta 1330 (#15185) 2022-06-29 03:04:46 -07:00
Max Schmitt e34fa4feeb
fix(evaluate): fallback to toJSON if it exists when serializing (#15188)
* fix(evaluate): fallback to toJSON if it exists when serializing

* fix test in ff

* window.performance test
2022-06-29 08:07:32 +02:00
Pavel Feldman 6a8d835145
chore: allow updating har while routing (#15197) 2022-06-28 15:09:36 -07:00
Sébastien Règne f43fe4855d
docs: fix route.fallback typo (#15173) 2022-06-28 13:46:54 -07:00
Max Schmitt aa1e736f3f
chore: print response body when browser download failed (#15101) 2022-06-28 18:19:31 +02:00
Pavel Feldman 8c590cb2af
chore: undeprecate sync headers() (#15152) 2022-06-27 10:34:32 -07:00
Playwright Service fab12c70f7
feat(chromium): roll to r1012 (#15111)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-06-27 10:01:10 +02:00
Dmitry Gozman 660516d22a
fix(network): make allHeaders wait until all headers are available (#15094)
fix(network): make allHeaders wait until all header are available

Before, calling `allHeaders()` from `page.on('request')` would yield
provisional headers instead.

With these changes:
- In Firefox, all headers are available immediately.
- In Chromium, all headers are available upon requestWillBeSentExtraInfo.
- In WebKit, all headers are available upon responseReceived.
- In all browsers, intercepted requests use "provisional" headers
  as all headers, since there is no network stack to change the headers.

Drive-by: migrated Chromium to `hasExtraInfo` flags that simplifies
the logic quite a bit.
2022-06-24 13:51:09 -07:00
Dmitry Gozman 2f11807552
fix(click): no element should intercept events over the target frame (#15043)
When target element is inside a non-main frame, there could be an
overlay in some of the parent frames that intercepts pointer events.
However, we never detected this case.
2022-06-24 13:17:25 -07:00
Pavel Feldman ae6f48c4b8
fix(route): match against updated url while chaining (#15112) 2022-06-24 10:48:16 -07:00
Stuart Lang eba2bdffb9
docs: fix typo: surved -> served (#15105) 2022-06-24 15:06:57 +02:00
Pavel Feldman 7bd72716f9
feat(har): introduce the slim mode (#15053) 2022-06-22 14:44:12 -07:00
Dmitry Gozman 033c250f6d
fix(har): remove types/har.d.ts, update har.ts per spec (#15046)
Drive-by: typo fix in `notFound` option name.
2022-06-22 12:16:29 -07:00
Playwright Service 01abff2090
feat(chromium-tip-of-tree): roll to r1017 (#15008)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-22 19:38:38 +02:00
Max Schmitt fb441faab1
fix: request/response events with backgroundPages (#15032) 2022-06-22 17:23:51 +02:00
Pavel Feldman 9525bedc1f
feat(har): re-add routeFromHAR (#15024) 2022-06-21 22:12:37 -07:00
Playwright Service da17490972
feat(webkit): roll to r1668 (#15012)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-06-21 17:22:09 -07:00
Playwright Service c0c1ada9fe
feat(webkit): roll to r1667 (#14960) 2022-06-21 14:04:52 -07:00
Dmitry Gozman 6af6fab84a
fix(har): internal redirect in renderer-initiated navigations (#15000)
fix(har): internal redirect in renderer-initiated navigations
2022-06-21 11:01:01 -07:00