Commit Graph

3907 Commits

Author SHA1 Message Date
Playwright Service
082d4d5552
feat(firefox): roll to r1439 (#29242)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-30 19:05:18 +01:00
Yury Semikhatsky
13550b7329
fix: add new line before sourceURL (#29199)
Reference https://github.com/microsoft/playwright/issues/29116
2024-01-29 15:00:42 -08:00
Yury Semikhatsky
ad6e40538a
fix(electron): make sure user arguments go first (#29204) 2024-01-29 15:00:12 -08:00
Pavel Feldman
c85308d717
chore: remove deprecated debug controller events (#29203) 2024-01-29 14:58:29 -08:00
Tanay Vardhan
e9a8fc944c
fix: Add support for exif jpeg file formats (#29208) 2024-01-29 14:58:13 -08:00
Bruno Mańczak
3e2d5b2800
docs: add an example of how to use "+" key as part of a shortcut (#29221) 2024-01-29 14:57:10 -08:00
Max Schmitt
4df4054f19
feat(driver): add option to strip out lone surrogates (#29179)
https://github.com/microsoft/playwright-dotnet/issues/2819
2024-01-29 22:14:55 +01:00
Dmitry Gozman
acc72c2663
fix(codegen): assertValue works with disabled input (#29205)
Also add tests for new codegen functionality.

Fixes #29161.
2024-01-27 14:54:22 -08:00
Max Schmitt
36ebdfb441
fix: provisional fix for Trace Viewer source 404 (#29192)
Motivation: Sometimes the files are not available anymore on the Service
Worker side. The Trace Viewer frontend then falls back to `file?path=`
and uses its response, no matter what the response status is.

This patch checks for the response status code before using its
response.

e.g. https://github.com/microsoft/playwright-dotnet/issues/2775 after
some time / and some other reports.

---------

Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: Dmitry Gozman <dgozman@gmail.com>
2024-01-27 14:05:15 +01:00
Dmitry Gozman
5ee7179b13
fix(test runner): make TestTracing responsible for trace management (#29181)
... instead of a fixture.

Fixes #29133, fixes #28733, fixes #28476.
2024-01-26 15:52:25 -08:00
Yury Semikhatsky
82981a8091
fix: interception id not found error in route.continue (#29180)
We stopped catching all exceptions in
https://github.com/microsoft/playwright/pull/28539 in hope that we'll
get loadingFailed even before Fetch.continue/fulfill command's error.
Turns out this is racy and may fail if the test cancels the request
while we are continuing it. The following test could in theory reproduce
it if stars align and the timing is good:

```js
it('page.continue on canceled request', async ({ page }) => {
  let resolveRoute;
  const routePromise = new Promise<Route>(f => resolveRoute = f);
  await page.route('http://test.com/x', resolveRoute);

  const evalPromise = page.evaluate(async () => {
    const abortController = new AbortController();
    (window as any).abortController = abortController;
    return fetch('http://test.com/x', { signal: abortController.signal }).catch(e => 'cancelled');
  });
  const route = await routePromise;
  void page.evaluate(() => (window as any).abortController.abort());
  await new Promise(f => setTimeout(f, 10));
  await route.continue();
  const req = await evalPromise;
  expect(req).toBe('cancelled');
});
```

Fixes https://github.com/microsoft/playwright/issues/29123
2024-01-25 16:54:42 -08:00
Yury Semikhatsky
0113e8455b
fix: make TeleSuite.project work for all suites (#29177)
Fixes https://github.com/microsoft/playwright/issues/29173
2024-01-25 13:44:08 -08:00
Max Schmitt
4c4789c740
chore: validate deps during install (#28932)
Motivation: On Windows we call around 50 times `PrintDeps.exe` which
takes on a very fast machine 500+ms. On Linux we do it around 120 times
(`ldd`) which takes around 150ms.

This change validates the dependencies once on browser install (`npx
playwright install`). In case its failing, it will emit a warning, in
case of a success, it will create a marker file that the binary has been
validated. For future `launch()` calls, we'll read this file and if
exists, we'll not validate again. Otherwise we'll validate again.

Note: If the marker file is older than 30 days, the browser will be
validated again.
2024-01-25 20:55:53 +01:00
Pavel Feldman
6a14b1dc51
chore: automatically detect the dev server (#29176) 2024-01-25 11:46:47 -08:00
Pavel Feldman
24ff2e2bad
chore: provisional fix for win install test failure (#29175) 2024-01-25 11:46:30 -08:00
Pavel Feldman
b5e175e6e2
fix: tolerate wrongly-typed annotations (#29162)
Fixes https://github.com/microsoft/playwright/issues/29149
2024-01-25 11:35:17 -08:00
Pavel Feldman
f7fb1e4d4e
chore(ct): use sticky test server if available (#29136) 2024-01-25 08:36:13 -08:00
Dmitry Gozman
f5de6e5538
feat(codegen): generate multiple selectors to choose from (#29154)
When possible, "pick locator" generates:
- default locator;
- locator without any text;
- locator without css `#id`.

Fixes #27875, fixes #5178.
2024-01-25 07:35:58 -08:00
Dmitry Gozman
bc83d7084c
fix(chromium): emulate navigator.userAgentData along with UA (#29159)
Fixes #28989, fixes #29139.
2024-01-25 07:34:11 -08:00
Playwright Service
129f5bfdbe
feat(chromium): roll to r1100 (#29167)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-25 15:24:49 +01:00
Playwright Service
6a04ed6a1e
feat(chromium-tip-of-tree): roll to r1188 (#29169)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-25 15:24:33 +01:00
Playwright Service
86c881f206
feat(chromium-tip-of-tree): roll to r1187 (#29153)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-24 18:36:00 +01:00
Max Schmitt
ba8d141de8
chore: drop Ubuntu 18.04 (#29145)
This will now yield:

```
root@a85fb37f0c96:/work# npx playwright install
Failed to install browsers
Error: ERROR: Playwright does not support chromium on ubuntu18.04-x64
```

On Ubuntu 18.04.
2024-01-24 17:46:20 +01:00
Pavel Feldman
cec2ff1772
chore: split cli processing into cli endpoint and program (#29131) 2024-01-23 15:22:09 -08:00
Dmitry Gozman
1ce3ca25a2
chore(role): cache element list by role (#29130) 2024-01-23 13:45:26 -08:00
Pavel Feldman
8898a537e0
chore: extract a dev variation of the ct plugin (#29126) 2024-01-23 12:55:28 -08:00
Dmitry Gozman
8e607d509f
fix(recorder): disallow external imports (#29129)
Previously, new `Recorder` instance was given an existing
`InjectedScript`. However, we built a separate source for
`InjectedScript` vs `Recorder`, and both bundles contain their own copy
of all helper modules, e.g. `roleUtils`.

This resulted in two copies of helper modules, which is troublesome for
any module-level globals like a top-level cache. Depending on whether
`Recorder` or `InjectedScript` called into the helper, they would access
the different value of a module global, which lead to bugs.

To prevent this, we force any external dependencies to be imported
through the `InjectedScript.utils`.
2024-01-23 11:29:40 -08:00
Dmitry Gozman
5bc5056a1f
chore(role): cache pseudo content calculation (#29115) 2024-01-23 10:09:23 -08:00
Pavel Feldman
41c15cb176
chore: move vite root dir into template folder (#29081) 2024-01-23 09:40:05 -08:00
Max Schmitt
d89ed88679
docs: do not recommend PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD anymore (#29121) 2024-01-23 09:12:47 -08:00
Playwright Service
3e2d7fe7e7
feat(chromium): roll to r1099 (#29120)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-23 13:34:59 +01:00
Dmitry Gozman
9b974e0026
chore: speedup frequent element text normalization (#29113)
We cache `ElementText` for frequent operations, but then call
`normalizeWhitespace` on it every time which burns a lot of CPU.
2024-01-22 21:33:56 -08:00
Yury Semikhatsky
fbf87ef904
fix: test.fail wrapper method (#29112)
Fixes https://github.com/microsoft/playwright/issues/29104
2024-01-22 19:47:27 -08:00
Yury Semikhatsky
b2de9bc865
fix: mock safari.pushNotification (#29107)
Fixes https://github.com/microsoft/playwright/issues/29032
2024-01-22 15:44:13 -08:00
Max Schmitt
db00aa7305
fix: remove unused TestInfo.stdout/stderr (#29076)
https://github.com/microsoft/playwright/issues/29062
2024-01-22 19:22:31 +01:00
Playwright Service
4e877f270d
feat(webkit): roll to r1970 (#29103)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-22 19:22:11 +01:00
Max Schmitt
c3566d259f
chore: better error messages when stable channel installations fail on Windows (#29077)
https://github.com/microsoft/playwright/issues/29004
2024-01-22 18:15:35 +01:00
dependabot[bot]
c635fc9a19
chore(deps): bump vite from 5.0.11 to 5.0.12 (#29078) 2024-01-19 17:23:07 -08:00
Yury Semikhatsky
d7958ba4ad
chore: quote path only if contains whitespaces (#29079)
Otherwise we always quote as `trace.zip` matches \W.

This is a follow-up to 674988c633
Reference https://github.com/microsoft/playwright/issues/29039
2024-01-19 16:52:39 -08:00
Pavel Feldman
d61f99034a
fix(ct-react): do not reset mount hooks upon update (#29072)
Fixes https://github.com/microsoft/playwright/issues/29058
2024-01-19 12:55:36 -08:00
Dmitry Gozman
f3fac6f4e9
feat: page.handleLocator that closes any interstitial pages/dialogs (#29029) 2024-01-19 12:35:00 -08:00
Pavel Feldman
71a48c2562
chore: migrate ct to vite5 (#29033)
Closes https://github.com/microsoft/playwright/issues/28607
2024-01-19 11:13:03 -08:00
Sander
54c57fdebe
chore(ct): revert export mount result (#29070) 2024-01-19 11:11:23 -08:00
Max Schmitt
e551506c9e
Revert "feat(codegen): add range input recording support (#28767)" (#29069) 2024-01-19 19:47:59 +01:00
Yury Semikhatsky
674988c633
chore: add quotes to the path only when necessary (#29057)
This is a follow-up to c76f5294ce
Reference https://github.com/microsoft/playwright/issues/29039
2024-01-19 10:27:15 -08:00
Playwright Service
057b0dd0ab
feat(firefox-beta): roll to r1438 (#29063)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-19 13:27:53 +01:00
Pavel Feldman
4010940315
chore: move off babel proposals to plugins (#29053) 2024-01-18 17:50:52 -08:00
Dmitry Gozman
b7d22b64e8
feat(merge): prepend bot name to global errors (#29055)
This way one can figure out where does the error come from.

An example merged report that exhibits the issue:
https://mspwblobreport.z1.web.core.windows.net/run-7563628632-1-2328b83af75801ab76bb06c214fee483cf5bc07c/index.html#?q=s%3Afailed%20s%3Aflaky
2024-01-18 15:11:32 -08:00
Yury Semikhatsky
c76f5294ce
fix: quote trace file path when printing error message (#29052)
Fixes https://github.com/microsoft/playwright/issues/29039
2024-01-18 14:23:12 -08:00
Max Schmitt
4a45724633
fix: open 0.0.0.0 as localhost (#29054)
Fixes https://github.com/microsoft/playwright/issues/29047
2024-01-18 22:21:49 +01:00
Playwright Service
84cf633c92
feat(chromium-tip-of-tree): roll to r1186 (#29044)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-18 21:24:28 +01:00
Playwright Service
7d7198c055
feat(webkit): roll to r1969 (#29050)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-18 11:36:43 -08:00
Pavel Feldman
03815b9eb1
chore: migrate to Node 18 lockFileVersion 3 (#29051) 2024-01-18 11:33:23 -08:00
Pavel Feldman
ee3960529e
fix(ct): allow passing date, url, bigint as properties (#29031)
Closes: https://github.com/microsoft/playwright/issues/29028,
https://github.com/microsoft/playwright/issues/29027
2024-01-17 20:43:28 -08:00
Dmitry Gozman
300a0127de
Revert "feat(trace): allow Trace Viewer to include credentials when fetching traces cross-origin (#28502)" (#29024)
This reverts commit 3f3f332060.

References #29019.
2024-01-17 10:40:58 -08:00
Pavel Feldman
1db18711a2
fix(ct): move import list into the compilation cache data (#28986) 2024-01-16 19:31:19 -08:00
Dmitry Gozman
e6d51cf7bd
chore: refactor actionability check to go through node-side retry (#28982)
This allows to inject a checkpoint in between the actionability checks.

Drive-by: cleanup `InjectedScriptPoll`-related code.
2024-01-16 19:11:41 -08:00
Dmitry Gozman
d023829dd5
fix(locator parser): allow escaped quotes in the digest function (#29012)
This supports mixed quotes locators in JavaScript where we are not sure
what quote is the correct one, so we normalize to unescaped single quote
when comparing with the original.

Drive-by: we were allowing single quotes in Python, Java and .NET, but
these are actually not allowed.

Regressed in #27718.
Fixes #28630.
2024-01-16 16:06:02 -08:00
Dmitry Gozman
9b657b54fb
fix(launcher): unregister global process handlers when all browser are closed (#29011)
Otherwise, we forever block SIGTERM and SIGHUP by registering a handler
that does not do anything (due to no browsers to close) and prevents
default handler that exits from running.

Fixes #28091.
2024-01-16 14:41:26 -08:00
Dmitry Gozman
775ef30e43
fix(test runner): make TestCase.id not depend on the path separator (#29010)
Fixes #28991.
2024-01-16 13:32:47 -08:00
Playwright Service
ab7d1b5e53
feat(webkit): roll to r1968 (#29009)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-16 20:26:36 +01:00
Playwright Service
25ec071277
feat(chromium-tip-of-tree): roll to r1185 (#29003)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-16 17:35:21 +01:00
jonghoonpark
4c0a972b69
feat(expect): Make toPass's option configurable by TestConfig (#28231)
Co-authored-by: jonghoon.park <jonghoon.park@lucentblock.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2024-01-16 12:28:38 +01:00
Pavel Feldman
bbe26dbdbb
chore: build import registry source (#28978) 2024-01-14 08:41:40 -08:00
Pavel Feldman
92ad1b385c
chore: refactor import processing in ct (#28975) 2024-01-12 20:02:27 -08:00
Max Schmitt
f2ebc53f18
chore: mark version 1.42.0-next (#28973) 2024-01-13 00:20:27 +01:00
Dmitry Gozman
48317af1cc
feat(trace): preserve noscript when javascript is disabled (#28971)
Closes #27504, closes #27532.
2024-01-12 12:11:39 -08:00
Max Schmitt
7670fd21e2
fix(esm): >= Node.js 21 globalPreload -> initialize (#28526)
https://github.com/microsoft/playwright/issues/28524
https://github.com/microsoft/playwright/issues/28732


https://nodejs.org/en/blog/announcements/v21-release-announce#module-customization-hook-globalpreload-removed-use-register-and-initialize-instead
2024-01-12 09:51:45 -08:00
Dmitry Gozman
90665ef056
docs: update auto-waiting doc (#28960)
- Replace action names with links to `Locator.click`.
- Remove "Attached" check in favor of "locator resolves to a single
element".
- Replace getter methods in assertion section with auto-retriying
assertions.
- Add missing actions.

---

<img width="837" alt="Screenshot 2024-01-11 at 1 02 34 PM"
src="https://github.com/microsoft/playwright/assets/9881434/1946678d-6a7e-45cf-a299-2f18cb3fb5a5">
2024-01-12 09:33:42 -08:00
Max Schmitt
808359ba6c
fix(driver): add external commands only for JS binding (#28968)
Motivation: Before this change if a language binding invoked the CLI
with `--help` or without any arguments (which will also show the help
text) it was suggesting that test/merge-reports/show-report is something
we support. After this change this does not get shown anymore.
2024-01-12 18:26:00 +01:00
Yury Semikhatsky
8936885a67
fix(chromium): preserve header overrides in redirects (#28962)
Reference https://github.com/microsoft/playwright/issues/28758
2024-01-12 08:55:20 -08:00
Playwright Service
69c9e985bf
feat(webkit): roll to r1967 (#28952)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-12 15:01:47 +01:00
Playwright Service
229ec522ac
feat(chromium-tip-of-tree): roll to r1184 (#28950)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-11 14:38:26 +01:00
Playwright Service
3ace946fc2
feat(chromium): roll to r1097 (#28949)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-11 14:38:16 +01:00
Pavel Feldman
38822d1014
chore: remove manual __esModule override (#28935) 2024-01-10 16:28:08 -08:00
Pavel Feldman
a0750b7854
chore: network panel polish (#28924) 2024-01-10 15:28:33 -08:00
Yury Semikhatsky
19a4f15eb6
chore: remove redundant checks from network interception (#28922)
We only intercept requests in Playwright so these fields are always
undefined.
2024-01-09 13:35:51 -08:00
Max Schmitt
2ddf3a45f9
chore(firefox): rewrite error message for $HOME directory ownership mismatch (#28921)
Fixes https://github.com/microsoft/playwright/issues/28896
2024-01-09 20:40:39 +01:00
Playwright Service
4b99d21dbd
feat(chromium-tip-of-tree): roll to r1183 (#28913)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-09 14:39:59 +01:00
Playwright Service
a519af6830
feat(webkit): roll to r1966 (#28911)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-09 11:03:40 +01:00
Max Schmitt
feece0f569
fix(deps): check only .dll/.exe files on Windows (#28901)
Fixes https://github.com/microsoft/playwright/issues/28846
2024-01-08 21:53:18 +01:00
Sander
28875fa608
chore(ct): dedupe types (#28816) 2024-01-07 19:45:42 -08:00
Playwright Service
76ab990208
feat(firefox-beta): roll to r1437 (#28888)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-07 20:23:06 +01:00
Playwright Service
f428f0793f
feat(firefox): roll to r1438 (#28882)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-05 21:11:34 +01:00
geke-scottlogic
6bd61cd8c6
docs: Improve clarity on toHaveText and toContainText assertions (#28623)
This closes https://github.com/microsoft/playwright/issues/28058.
2024-01-05 09:20:50 -08:00
Playwright Service
572e656be0
feat(chromium): roll to r1096 (#28878)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-05 13:21:50 +01:00
Playwright Service
ce2ffd90f5
feat(firefox-beta): roll to r1436 (#28876)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-05 11:17:44 +01:00
Playwright Service
76cd76ff1c
feat(webkit): roll to r1965 (#28868)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-04 20:49:05 +01:00
Playwright Service
edf369ea3c
feat(chromium-tip-of-tree): roll to r1182 (#28864)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-04 17:19:56 +01:00
Sander
eebb69121e
fix(ct): vue update slots (#28835)
Due to [Vue 3.4](https://blog.vuejs.org/posts/vue-3-4): _"refactored
reactivity system that makes effect triggering more accurate and
efficient"_

closes: https://github.com/microsoft/playwright/issues/28830
2024-01-03 20:48:41 +01:00
Max Schmitt
58fa4fce74
fix: use logger in default context with connectOverCDP (#28838)
Fixes https://github.com/microsoft/playwright/issues/28813
2024-01-03 19:49:47 +01:00
Playwright Service
620c82af48
feat(webkit): roll to r1964 (#28839) 2024-01-03 09:06:59 +01:00
Playwright Service
3dfd7edf99
feat(chromium-tip-of-tree): roll to r1181 (#28831)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-02 14:35:15 +01:00
Playwright Service
a7c9060731
feat(webkit): roll to r1963 (#28820)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-02 09:37:18 +01:00
Rui Figueira
778828cc43
feat(codegen): add range input recording support (#28767) 2023-12-30 17:22:57 -08:00
Playwright Service
214b3733b2
feat(webkit): roll to r1962 (#28803) 2023-12-28 15:18:18 +01:00
Playwright Service
19b309f80b
feat(chromium-tip-of-tree): roll to r1180 (#28804) 2023-12-28 15:17:53 +01:00
Playwright Service
2d5488d8e3
feat(chromium-tip-of-tree): roll to r1179 (#28787)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2023-12-26 21:00:39 +01:00
Playwright Service
39abc6386f
feat(webkit): roll to r1961 (#28776)
Signed-off-by: Max Schmitt <max@schmitt.mx>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Max Schmitt <max@schmitt.mx>
2023-12-23 09:25:07 +01:00
Playwright Service
b06b772ae7
feat(webkit): roll to r1960 (#28777) 2023-12-23 09:23:37 +01:00