Commit Graph

775 Commits

Author SHA1 Message Date
Yury Semikhatsky
abced7223c
fix: filechooser interception in OOPIFs (#14432) 2022-05-27 13:04:58 -07:00
Playwright Service
962d933c78
feat(chromium-tip-of-tree): roll to r1010 (#14446)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-27 21:49:19 +02:00
Pavel Feldman
6efb1ec40c
fix(ts): export types explicitly (#14428) 2022-05-26 13:09:32 -07:00
Ross Wollman
cfc9aa64a6
chore: produce meaningful bundle notice diffs (#14396) 2022-05-24 22:19:54 -07:00
Pavel Feldman
2fab2c1ca1
fix(tracing): invalidate non-stalling evaluates on crash (#14392) 2022-05-24 14:02:32 -07:00
Playwright Service
c12a9077d5
feat(chromium): roll to r1007 (#14307)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-24 11:26:20 +03:00
Max Schmitt
e02e5e66f0
chore: bump TypeScript to 4.6 (#14358) 2022-05-23 22:59:33 +03:00
Playwright Service
ae37decd73
feat(webkit): roll to r1648 (#14318) 2022-05-23 09:08:57 -07:00
Pavel Feldman
a1324bd935
fix(route): support route w/ async handler & times (#14317) 2022-05-21 21:55:46 -07:00
Pavel Feldman
b92163176d
chore: render titles on all matching nodes (#14316) 2022-05-20 22:09:10 -07:00
Ross Wollman
fbb364c1cd
fix: page.locator.focus() and page.locator(…).type(…) (#14267)
Fixes focus and blur management when `page.locator(…).focus()`  and  `page.locator(…).type(…)` are used which was regressed by 7a5b070 (#13510).

#13510 relied on an implicit assumption that this (conditional) [`blur`](7a5b070e95/packages/playwright-core/src/server/injected/injectedScript.ts (L672)) call would always be followed by a call that resulted in a newly focused element via this [`focus`](7a5b070e95/packages/playwright-core/src/server/injected/injectedScript.ts (L674)) call.

However, some elements are [not focusable](https://html.spec.whatwg.org/multipage/interaction.html#focusable-area), so we were blurring incorrectly, and losing focus that we should have maintained.

Two regression tests were added that pass on the commit prior to 7a5b070e95 (and match manual testing/expectations):

* `page.locator(…).focus()`: _keeps focus on element when attempting to focus a non-focusable element_
* `page.locator(…).type(…)`: _should type repeatedly in input in shadow dom_

Additionally, a third test (_should type repeatedly in input in shadow dom_) was added to check the invariant from #13510 that states:

> This affects [contenteditable] elements, but not input elements.

and allows us to introduce the targeted fix (contenteditble check before blur) without breaking FF again.

And _should type repeatedly in contenteditable in shadow dom with nested elements_ was added to ensure the above fix works with nest contenteditble detection.

Fixes #14254.
2022-05-19 14:31:56 -07:00
Andrey Lushnikov
9a73dfe773
feat(chromium-tip-of-tree): roll Chromium TOT to 1008 (#14279) 2022-05-19 09:29:44 -07:00
github-actions[bot]
d6780c5b29
feat(chromium-tip-of-tree): roll to r1007 (#14225)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrey Lushnikov <aslushnikov@gmail.com>
2022-05-19 07:10:18 -07:00
Pavel Feldman
d5ea1b38f0
fix(recorder): remove waitForNavigation from codegen (#14166) 2022-05-18 10:02:09 -07:00
Pavel Feldman
b5beeab98b
fix(click): climb the hit target hierarchy to anchor (#14235)
fix(click): climb the hit target hierarcchy to anchor
2022-05-18 10:01:34 -07:00
Pavel Feldman
fe0afd6b5c
fix(toHaveProperty): serialize falsy arguments as well (#14232) 2022-05-17 14:44:12 -07:00
Max Schmitt
9256de5f48
chore: fix wrong toHaveScreenshot defaults in docs (#14200) 2022-05-16 22:26:23 +03:00
github-actions[bot]
f1307f4a4d
feat(chromium): roll to r1006 (#14192)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-16 10:56:38 -07:00
Andrey Lushnikov
f7adbd83ee
chore: cut v1.22.0 (#14098) 2022-05-12 11:12:01 -07:00
Dmitry Gozman
f6712ec43a
fix(tracing): workaround chromium scrollTop slowness (#14114)
References #14037.

We used to query and save all non-zero `scrollTop`/`scrollLeft` to restore the page perfectly. However, this became very slow with Chromium v100 regression (see issue).

This change only queries and stores `scrollTop`/`scrollLeft` for elements that are ancestors of the action target. The resulting snapshot does not perfectly recreate the original screen, but should be good enough to inspect the action.
2022-05-12 10:55:29 -07:00
Dmitry Gozman
0e2855348c
feat(locators): remove layout locators (#14129) 2022-05-12 18:50:19 +01:00
Max Schmitt
2844623109
docs: add route class -> networking guide reference (#14092) 2022-05-11 16:07:00 +01:00
Dmitry Gozman
b753ff8686
chore: split injected utils into proper files (#14093) 2022-05-11 13:49:12 +01:00
Pavel Feldman
c99ca17199
chore: disable AvoidUnnecessaryBeforeUnloadCheckSync on chromium (#14080) 2022-05-10 14:55:44 -07:00
Dmitry Gozman
ba0cfaeb2d
fix(chromium): work around about:blank issue on Chromium (#14068)
fix(chromium): work around about:blank issue on Chromium

We don't receive the `loaderId` which translates to `newDocumentId`,
so we expect the same-document navigation. Instead, we can wait
for any new-document navigation as a workaround, only for `about:blank`.

This also reverts commit f0f65fa247.
2022-05-10 20:32:19 +01:00
github-actions[bot]
653373a75a
feat(chromium-tip-of-tree): roll to r1005 (#14064)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-10 10:05:15 -07:00
github-actions[bot]
8a517c6d82
feat(webkit): roll to r1641 (#14061)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-10 07:41:46 -07:00
Andrey Lushnikov
3ba1ea5c39
fix: support installing dependencies on non-ubuntu. (#14010)
We should not fast-return if someone tries to run
`npx playwright install-deps` on Debian.

Instead, we should warn users, fallback to Ubuntu 20.04 dependencies,
and proceed.
2022-05-10 04:05:39 -07:00
Pavel Feldman
cf89a36181
chore: serialize circular objects (#14045) 2022-05-09 18:51:53 -07:00
Pavel Feldman
f0f65fa247 Revert "feat(chromium): roll to r1005 (#13999)"
This reverts commit 56b3bca8db.
2022-05-09 18:28:39 -07:00
Pavel Feldman
e55f7bd896
feat(bindings): best-effort serialize circular structures (#14008) 2022-05-09 15:07:04 -07:00
Max Schmitt
04fafcabd8
fix: leaking server side objects (#13991) 2022-05-09 17:34:00 +01:00
github-actions[bot]
56b3bca8db
feat(chromium): roll to r1005 (#13999)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2022-05-09 15:52:00 +01:00
Pavel Feldman
a052211dbf
chore: do not reset internal bindings for reuse (#14019) 2022-05-09 07:44:20 -07:00
github-actions[bot]
f4dc067a49
feat(chromium-tip-of-tree): roll to r1004 (#13966)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-09 15:12:47 +01:00
Dmitry Gozman
6931d89eaf
feat(locators): rename locator.that to locator.filter (#14025) 2022-05-08 21:59:40 +01:00
Dmitry Gozman
64cd55089a
chore: role selectors non-experimental (#14021) 2022-05-08 11:07:01 +01:00
Dmitry Gozman
c3cf7ee4a7
feat(layout locators): remove maxDistance option (#14013) 2022-05-08 07:18:16 +01:00
Pavel Feldman
5c9e7f48e0
fix(debug): do not pause on internal calls, update ct docs (#14018) 2022-05-07 19:56:25 -07:00
Andrey Lushnikov
5a5bb36d28
chore: nuke "fonts" screenshot option (#14004)
It was never released since it wasn't working as expected on WebKit WPE.

Fixes #12839
2022-05-06 17:54:17 -07:00
github-actions[bot]
a1cda41cfd
feat(webkit): roll to r1640 (#13982) 2022-05-06 11:06:47 -07:00
github-actions[bot]
88fd4a79a8
feat(webkit): roll to r1638 (#13956) 2022-05-05 08:41:02 -07:00
Andrey Lushnikov
bfafb2680d
fix: put browserVersion in the browsers.json (#13946)
This patch:
- adds `browserVersion` field to the `browsers.json`. This is
  updated every time we roll browser.
- starts using `browserVersion` to display browser version that's
  been downloaded.

The downloading output now looks like this:

```bash
Downloading Chromium 101.0.4951.41 (playwright build v1003) - 118.9 Mb [====================] 100% 0.0s
Chromium 101.0.4951.41 (playwright build v1003) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/chromium-1003
Downloading FFMPEG playwright build v1007 - 1 Mb [====================] 100% 0.0s
FFMPEG playwright build v1007 downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/ffmpeg-1007
Downloading Firefox 99.0.1 (playwright build v1323) - 67.5 Mb [====================] 100% 0.0s
Firefox 99.0.1 (playwright build v1323) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/firefox-1323
Downloading Webkit 15.4 (playwright build v1632) - 52.7 Mb [====================] 100% 0.0s
Webkit 15.4 (playwright build v1632) downloaded to /Users/andreylushnikov/Library/Caches/ms-playwright/webkit-1632
```

Fixes #13198
2022-05-05 04:17:13 -07:00
github-actions[bot]
969e6f2ada
feat(webkit): roll to r1637 (#13916) 2022-05-04 16:38:25 -07:00
Dmitry Gozman
cf5101d44a
fix(networkidle): do not produce networkidle event on errored pages (#13938) 2022-05-04 20:52:50 +01:00
Yury Semikhatsky
a919414553
feat(chromium): roll tot, ignore unknown session error (#13932)
After https://chromium-review.googlesource.com/c/chromium/src/+/3606712 browser returns an error to messages addressed to unknown session id (previously such messages would never get a response).

#13637
2022-05-04 10:00:02 -07:00
Dmitry Gozman
cd53346594
fix(codegen): do not reset current source on every recorded action (#13925)
Currently, when I choose "Java" in the sources list and then
click on the page to generate the "click" action, sources reset
to "JavaScript". This is very inconvenient.

This changes the logic to only forcefully change files if either
old or new file is a user file, not a generated one.

Use cases considered:
- run `codegen`, click around, choose different language, click more;
- run script with inspector, pause, click "Record" and record an action;
- same as above, but then continue and see that user source is revealed.
2022-05-04 17:16:24 +01:00
Dmitry Gozman
9e0aa67d28
feat(codegen): brush up context options in pytest codegen (#13924) 2022-05-04 11:14:53 +01:00
Ronie Martinez
2c597f06bd
feat(codegen): pytest support in codegen (#13746)
feat(codegen): pytest support in codegen
2022-05-04 09:41:20 +01:00
Max Schmitt
b5183b4cf9
chore: make React selectors work on React 18 (#13864)
Fixes #13845
2022-05-03 13:46:52 -07:00
github-actions[bot]
029aff16e4
feat(firefox): roll to r1323 (#13897)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-05-03 09:14:20 -07:00
Dmitry Gozman
54dd6d01e5
feat(locator): layout options (leftOf, rightOf, above, below, near) (#13821)
This also includes corresponding selector engines `left-of` and others,
modeled after existing `has` selector engine.
2022-05-03 10:33:33 +01:00
Yury Semikhatsky
ed344a882b
fix: delete headers with undefined value (#13880) 2022-05-02 12:38:57 -07:00
Andrey Lushnikov
bd2a2873b7
chore: unexperiment role selectors (#13858) 2022-05-02 09:32:50 -07:00
Yury Semikhatsky
4b682f9f13
fix(chromium): disable DialMediaRouteProvider in addition to MediaRouter (#13854) 2022-04-29 14:29:31 -07:00
Dmitry Gozman
dc3f2d26c4
docs: add details to the element screenshot methods (#13847) 2022-04-29 17:36:09 +01:00
Pavel Feldman
18bff137ce
chore: remove default config from cli (#13832) 2022-04-28 16:49:36 -07:00
Andrey Lushnikov
a06b06b82b
fix: typo in the missing X Display error message (#13810) 2022-04-28 08:35:01 -07:00
Pavel Feldman
e756528ad2
feat(plugins): expose suite to plugin setup (#13807) 2022-04-28 08:16:17 -07:00
Dmitry Gozman
38fdc5fe24
fix(selectors): refactor chaining logic (#13764)
This fixes a few issues:
- strict mode was producing false negatives if multiple query paths
  lead to the same element being picked;
- in some cases the number of intermediate items in the list was
  exponential and crashed quickly.

What changed:
- `visible` engine is a real engine now;
- `capture` selectors are transformed to `has=` selectors for
  easier implementation;
- chained querying switched from a list to a set to avoid
  exponential size.
2022-04-27 20:51:57 +01:00
github-actions[bot]
d97324e2bd
feat(firefox-beta): roll to r1323 (#13777)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-27 07:24:07 -07:00
Max Schmitt
a0c24c01c8
chore: fix docs links for .NET roll (#13787) 2022-04-27 16:06:30 +02:00
Dmitry Gozman
dab2384b0e
fix(process launcher): use spawnSync to cleanup synchronously (#13769)
This allows us to use the full retry logic of rimraf in the `onexit` handler.
Note this is already covered by failing on Windows test
`should remove temp dir on process.exit`.
2022-04-27 15:01:30 +01:00
Dmitry Gozman
c0f0979055
fix(frames): networkidle for iframes with quirky urls (#13767) 2022-04-26 17:13:45 +01:00
Max Schmitt
37bee74ae5
chore: set minimum version to Node.js 14 (#13469) 2022-04-26 17:52:32 +02:00
Dmitry Gozman
39cfa2b6e3
test: switch temp dir tests to use userDataDir (#13745) 2022-04-26 09:32:58 +01:00
Dmitry Gozman
97750ccf9a
feat: locator.that (#13731)
Filters existing locator by options, currently `has` and `hasText`.
2022-04-25 20:06:18 +01:00
Yury Semikhatsky
aab1a746d3
fix: join individual css selectors by > in cssFallback (#13712) 2022-04-25 11:11:24 -07:00
Dmitry Gozman
d2bdb1d7cf
docs: explain label retargeting in selectors doc and some input actions (#13725) 2022-04-25 13:55:41 +01:00
Dmitry Gozman
01a8977b4d
feat: make scrollIntoView work with zero-sized elements (#13702)
We skip waiting for "visible" state that enforces non-zero size.
Other invisible conditions like "display:none" fail during the
actual "scrolling" step and will retry.
2022-04-23 21:48:36 +01:00
Max Schmitt
39525878ab
chore: show small progress bar in downloader without tty (#13690) 2022-04-22 19:55:43 +02:00
Andrey Lushnikov
317b649f78
feat: support tip-of-tree chromium channel (#13701) 2022-04-22 09:43:57 -07:00
Max Schmitt
ca4cfca8ad
chore: make tests pass on Node.js 17+ (#13678) 2022-04-22 13:42:52 +02:00
Yury Semikhatsky
801dbe0699
fix(oopif): dispose child sessions when frame session is disposed (#13693) 2022-04-21 18:32:56 -07:00
Pavel Feldman
5990eb6074
chore: use vite plugin for registry (#13658) 2022-04-21 17:30:17 -07:00
Pavel Feldman
89b8fdd4e5
fix(tracing): do not reset frame counter on every chunk (#13689) 2022-04-21 15:40:30 -07:00
github-actions[bot]
5753f7a7fa
feat(chromium): roll to r1003 (#13680)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-21 22:22:15 +02:00
Max Schmitt
4a3180aca9
chore: make Android host option configurable (#13685) 2022-04-21 22:16:42 +02:00
github-actions[bot]
c551284498
feat(webkit): roll to r1632 (#13670) 2022-04-21 09:47:22 -07:00
Max Schmitt
c397daeb07
chore: language agnostic browsers missing error message (#13650) 2022-04-20 12:02:28 -07:00
Pavel Feldman
06645b0a1f
chore: fix the android ws sender/receiver (#13641) 2022-04-19 13:28:05 -07:00
Yury Semikhatsky
0a401b2d86
docs: clarify semantics of redirected response (#13636) 2022-04-19 09:36:38 -07:00
Andrey Lushnikov
a617604962
test: make sure toHaveScreenshot doesn't tolerate bad option values (#13627)
Fixes #13495
2022-04-19 07:43:18 -07:00
Andrey Lushnikov
80bc532874
fix: support undo/redo editing commands (#13606)
Fixes #13601
2022-04-18 22:22:52 -07:00
Pavel Feldman
3c896f6bc5
fix(tests): installation tests (#13623) 2022-04-18 22:17:56 -07:00
Pavel Feldman
007e908cd9
chore: bundle pwt deps (#13622) 2022-04-18 21:47:18 -07:00
Pavel Feldman
7989427ea6
chore: bundle core deps (#13621) 2022-04-18 20:20:49 -07:00
github-actions[bot]
41db08eca5
feat(webkit): roll to r1631 (#13612) 2022-04-18 18:48:43 -07:00
Pavel Feldman
63ea81ec54
chore: make bundles typed (#13620) 2022-04-18 17:50:25 -07:00
Pavel Feldman
58d79e5e4d
chore: add core utils bundle (#13615) 2022-04-18 13:47:23 -07:00
Pavel Feldman
4f0103fef0
chore: babel, expect, zip bundles (#13588) 2022-04-18 11:31:58 -07:00
Pavel Feldman
5f843c347d
chore: bundle pixelmatch, it has not changed for 2 years (#13585) 2022-04-15 16:58:31 -07:00
Yury Semikhatsky
7ffce1da53
chore: remove PlaywrightClient and Docker factory (#13571) 2022-04-15 12:11:38 -07:00
Yury Semikhatsky
aee6ba299a
chore: remove GridClient, run only page tests in service mode (#13566) 2022-04-14 15:30:04 -07:00
Ross Wollman
11179982fc
chore: force localPaths to be resolved (#13544) 2022-04-14 11:19:36 -07:00
github-actions[bot]
a29a986d67
feat(chromium): roll to r1002 (#13554)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-04-14 14:51:03 +02:00
Max Schmitt
584140f97a
fix: make fetch api work with connectOverCDP (#13521) 2022-04-14 12:53:49 +02:00
Dmitry Gozman
20dcc45afa
feat: support experimental doc entries (#13446)
feat: support experimental doc entries

- Params/options/members are marked as experimental in the docs.
- `experimental.d.ts` is generated that contains all types and
  includes experimental features.
- `experimental.d.ts` is references in our tests so that we
  can test experimental features.
- `fonts` option is restored as experimental.
2022-04-13 16:13:30 -07:00
Yury Semikhatsky
e2fff31848
chore: send run_id from agent to server (#13542) 2022-04-13 12:13:35 -07:00
Yury Semikhatsky
00199b5617
chore: add link to workflow (#13541) 2022-04-13 11:56:00 -07:00