Commit Graph

64 Commits

Author SHA1 Message Date
Jim Hays
dcc8dcca73
Fix various typos (Fixes #27396) (#27391)
Fixes https://github.com/microsoft/playwright/issues/27396
2023-10-04 19:56:42 -07:00
Dmitry Gozman
2af7d672ef
fix(tracing): bump trace version to V5, migrate V4 traces to consoleMessage.args (#27162)
This moves the fix in #27095 from `modernize` to `appendEvent`. The
reason is that `trace V4` is used both for older traces that do not have
`consoleMessage.args` and the new ones with `args`. Since we do not call
`modernize` for traces of the same version, the original fix does not
help in this case.

Fixes #27144.
2023-09-19 16:21:09 -07:00
Pavel Feldman
53bf1995db
chore: do not leak internal page handles after closing page (#24169)
Partial fix for https://github.com/microsoft/playwright/issues/6319

After this fix, the following scenario won't leak and the context state
(cookies, storage, etc) can be reused by the new page sessions:

```js
  for (let i = 0; i < 1000; ++i) {
    const page = await context.newPage();
    await page.goto('...');
    await page.close('...');
  }
```
2023-07-12 14:51:13 -07:00
Pavel Feldman
67ad2c2bf4
feat(ui): render all console / network messages in trace (#24115) 2023-07-10 12:56:56 -07:00
Dmitry Gozman
5cfd6d9fe9
fix(cr network): emit sw-handled requests when routing is enabled (#23589)
Previously, such requests were skipped because they never receive
`Fetch.requestPaused` as there was no real network.

Also cleanup some redundant tests and move them from chromium-only file.

Fixes #23424.
2023-06-08 10:33:28 -07:00
João Neves
7e6e5f0706
feat: Support React forwards refs and memo (#23262)
This PR fixes the react selector behavior to support components that are
wrapped by the memo or forwardRef React builtin functions.

Previously these components couldn't be selected. This PR fixes that
behavior, enabling selecting those components.

Current behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> undefined
```

Fixed behavior:
```
const Foo = memo(() => <div id="foo_component" />);
Foo.displayName = "Foo";
...
playwright.$("_react=Foo") -> <div id ="foo_component" />
```
2023-05-30 17:14:47 -07:00
Max Schmitt
2710fd8d6f
fix: should be able to upload multiple large files (#23360)
Fixes https://github.com/microsoft/playwright/issues/23258
2023-05-30 18:41:09 +02:00
Alexander Sorokin
cbf4f39957
fix: React selectors should work after unmount (#22750)
Fixes #22729
2023-05-10 06:18:01 -07:00
Andrey Lushnikov
da87a0af76
test: update selenium server and try to reenable tests (#22391)
This patch updates selenium server to 4.8.3, hoping that it
fixed the issue.

Fixes https://github.com/microsoft/playwright/issues/21733
2023-04-13 14:15:09 -07:00
Max Schmitt
054fcd39ba
chore: remove Selenium jar files from repo (#21939) 2023-03-23 22:00:30 +01:00
Pavel Feldman
6b83631f24
chore: fix trace viewer backwards compat (#21935) 2023-03-23 12:49:53 -07:00
Dmitry Gozman
cabeb42c8c
chore: update selenium tests from 4.0.0-rc1 to 4.4.0 (#21235) 2023-02-27 16:58:08 -08:00
Andrey Lushnikov
1120b82ba2
feat(firefox): roll Firefox & Firefox Beta (#20670)
Fixes #19685 
Fixes #20093
2023-02-06 14:08:32 -08:00
chimurai
f72d400952
chore: fix typos (#20473) 2023-01-30 09:53:28 +01:00
Yury Semikhatsky
faadbba63c
test: webm video player (#20421)
Fixes #18423
2023-01-27 09:48:47 -08:00
Dmitry Gozman
0087bfac23
fix(role): update allowsNameFromContent to closer align with blink/gecko (#19692) 2022-12-27 09:06:46 -08:00
Dmitry Gozman
190ed9465f
fix(chromium): detach from shared workers (#18976)
This prevents shared workers from stalling upon restart.

We receive `Inspector.targetCrashed` and
`Inspector.targetReloadedAfterCrash` events that assume
`Runtime.runIfWaitingForDebugger` from any attached client. It is easier
and more stable to just detach from shared workers, because we do not
inspect them.

For service workers, we should actually issue
`Runtime.runIfWaitingForDebugger` in such cases, because we attach to
them.

Fixes #18932.
2022-11-22 15:20:42 -08:00
Pavel Feldman
2841b0b3dc fix: address ff test failure with new event mode 2022-11-10 17:31:43 -08:00
Dmitry Gozman
06e0ea5e24
test: unflake page-drag tests (#17783)
To avoid rounding errors, make coordinates even.
2022-10-03 12:26:36 -07:00
Dmitry Gozman
8c416653f9
test: improve drag&drop tests (#17668)
- Add tests for dragging in iframes.
- Check drag events coordinates.

References #17153.
2022-09-30 09:29:19 -07:00
Ross Wollman
af5e06fbfd
test: repro for spaces in filename for input (#17452) 2022-09-20 12:58:26 -07:00
Yury Semikhatsky
077b8a9289
test: link preload interception (#16908) 2022-08-30 10:35:55 -07:00
Dmitry Gozman
aac9df0542
test: update "page.goBack should work for file urls" to match status quo (#16810)
Chromium works correctly, WebKit mac has a security error, Firefox fails to go back.
2022-08-26 08:56:31 -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
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
Pavel Feldman
7bd72716f9
feat(har): introduce the slim mode (#15053) 2022-06-22 14:44:12 -07:00
Playwright Service
c0c1ada9fe
feat(webkit): roll to r1667 (#14960) 2022-06-21 14:04:52 -07:00
Dmitry Gozman
5397394653
feature(har): add testOptions.har (#14991)
Can now be used with `test.use({ har })`.
Also added more tests for latest har features.
2022-06-20 13:37:31 -07:00
Yury Semikhatsky
ed6b14f0f4
fix(har): restart redirected navigation (#14939) 2022-06-17 21:17:30 -07:00
Pavel Feldman
e9069bef6b
fix(body): fetch body explicitly for prefetched scripts (#14941) 2022-06-16 22:07:43 -07:00
Dmitry Gozman
7c0bff15ca
feat(fulfill): improve fulfilling from har (#14789)
- `har` option is now an object `{ path, fallback }`.
- Allows falling back to `abort()`, `continue()` or throwing.
- Matches based on url + method.
- Follows redirects in the HAR file.
- Nice error/stack when throwing.
- Tests.
2022-06-10 14:26:45 -07:00
Pavel Feldman
f0b077ea82
test(stress): add stress tests (#14240) 2022-05-18 09:50:58 -07:00
Max Schmitt
b5183b4cf9
chore: make React selectors work on React 18 (#13864)
Fixes #13845
2022-05-03 13:46:52 -07:00
Yury Semikhatsky
0839817ff2
test: delete should not hang in exposeBinding test (#13705) 2022-04-22 12:16:12 -07:00
Yury Semikhatsky
801dbe0699
fix(oopif): dispose child sessions when frame session is disposed (#13693) 2022-04-21 18:32:56 -07:00
Dmitry Gozman
6b48631eed
feat(role): add more tests for accessible name (#13154) 2022-03-29 11:59:44 -07:00
Dmitry Gozman
01a39e5b4c
test(role): add tests for implicit role calculation (#13132) 2022-03-28 15:22:50 -07:00
Dmitry Gozman
dea6528c0c
feat(aria): introduce role utils (#12916)
This includes aria role and accessible name computation.
Accessible name is covered by wpt tests.
2022-03-21 17:26:45 -07:00
Yury Semikhatsky
a8d80621b2
feat(chromium): large file uploads (#12860) 2022-03-18 09:00:52 -07:00
Andrey Lushnikov
49e66c7f08
feat(screenshot): introduce new "fonts" option for screenshots (#12661)
This option will wait for webfonts to load before taking screenshots.
2022-03-10 16:54:36 -08:00
github-actions[bot]
702536d962
feat(webkit): roll to r1616 (#12541)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Yury Semikhatsky <yurys@chromium.org>
2022-03-06 12:22:47 +01:00
Andrey Lushnikov
6f87955243
feat: introduce disableAnimations option for screenshots (#11870)
This option stops all kinds of CSS animations while doing screenshot:
- CSS animations
- CSS transitions
- Web Animations

Animations get different treatment depending on animation duration:
- finite animations are fast-forwarded to its end, issuing the
  `transitionend` event.
- Infinite animations are resetted to its beginning, and then
  resumed after the screenshot.

References #9938, fixes #11912
2022-02-09 12:52:11 -08:00
Dmitry Gozman
0b04c7d504
fix(drag&drop): relax layout shift logic when dropping (#11760)
When element that is being dragged stays under the mouse,
it prevents the hit target check on drop from working,
because drop target is overlayed by the dragged element.

To workaround this, we perform a one-time hit target check
before moving for the drop, as we used to.
2022-01-31 16:21:35 -08:00
Pavel Feldman
a65f7066d5
fix(webkit): improve orientation detection (#11481) 2022-01-19 10:07:38 -08:00
Andrey Lushnikov
2957b7b013
feat(firefox-beta): roll to r1310 (#10954) 2021-12-15 17:33:09 -08:00
Max Schmitt
40bd156173
test: add test for playing audio (#10890) 2021-12-13 15:02:06 -08:00
Dmitry Gozman
045cf1a56e
test: add a test for clicking on material ui select (#10652) 2021-12-01 15:14:28 -08:00
Yury Semikhatsky
15a8b29961
test: goto finishes on window.stop() (#10070) 2021-11-05 16:51:22 -07:00
Max Schmitt
ceafa6548d
test: add test for downloading PDF files (#9235) 2021-09-30 17:50:13 +02:00
Dmitry Gozman
2afe76d86d
feat(launch): connect to process.env.SELENIUM_REMOTE_URL instead of local launch (#9056) 2021-09-22 21:13:32 -07:00