Commit Graph

2370 Commits

Author SHA1 Message Date
Playwright Service
80189c9daf
feat(chromium-tip-of-tree): roll to r1190 (#29291)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-01 14:42:55 +01:00
Playwright Service
b32a539470
feat(chromium): roll to r1101 (#29290)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-02-01 14:23:40 +01:00
Dmitry Gozman
7cb886ce07
fix(codegen): refresh overlay listeners upon documentElement change (#29277)
This is similar to other listeners that we refresh upon
`onGlobalListenersRemoved`. Covered by sometimes flaky codegen tests.
2024-01-31 17:08:15 -08:00
Playwright Service
ad0be80717
feat(webkit): roll to r1973 (#29274)
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>
2024-02-01 00:31:13 +01:00
Max Schmitt
622153db18
Revert "chore: remove fake error from expect calls (#28112)" (#29271)
This reverts commit 2c3955a28c.

Relates https://github.com/microsoft/playwright-python/issues/2258
2024-01-31 23:43:37 +01:00
Playwright Service
15a20259b9
feat(webkit): roll to r1972 (#29269)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-31 23:43:26 +01:00
Pavel Feldman
aff6cf3c83
chore: extract ws server util (#29247) 2024-01-30 14:36:51 -08:00
Dmitry Gozman
aeafd44726
chore: strip Authorization header on ws redirect (#29246) 2024-01-30 14:26:25 -08:00
Playwright Service
4c0db7ba78
feat(firefox-beta): roll to r1439 (#29243)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-30 19:44:36 +01:00
Playwright Service
7b440d48f7
feat(chromium-tip-of-tree): roll to r1189 (#29244)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-01-30 19:43:44 +01:00
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
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
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
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
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
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
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
b2de9bc865
fix: mock safari.pushNotification (#29107)
Fixes https://github.com/microsoft/playwright/issues/29032
2024-01-22 15:44:13 -08: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
Dmitry Gozman
f3fac6f4e9
feat: page.handleLocator that closes any interstitial pages/dialogs (#29029) 2024-01-19 12:35:00 -08:00
Max Schmitt
e551506c9e
Revert "feat(codegen): add range input recording support (#28767)" (#29069) 2024-01-19 19:47:59 +01: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
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
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