Commit Graph

11991 Commits

Author SHA1 Message Date
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
Daniel Han
be6ab76c04
docs: add CLI documentation for --no-deps (#29235) 2024-01-30 11:44:33 -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
Max Schmitt
4affcdef71
devops: run tests on macOS 14 (#29241) 2024-01-30 18:04:35 +01:00
iridescentGray
289127d523
docs: fix python mock docs (#29230) 2024-01-30 09:04:28 +01:00
iridescentGray
14f94fcff5
fix: python mock doc Missing (#29187) 2024-01-29 15:02:19 -08: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
John Hill
82f40d0802
docs: Add Warning about Github Annotations (#29202) 2024-01-29 14:59:28 -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
Max Schmitt
f4b8ff9c95
fix: don't use git status for workspace consistency (#29224)
Motivation: We verify this already in the
[infra.yml](https://github.com/microsoft/playwright/blob/main/.github/workflows/infra.yml).
Doing it in `workspace.js` breaks the canary builds, because it has
stray files (package.json / package-lock.json).
2024-01-29 20:13:54 +01:00
Max Schmitt
1db4e2effb
devops: bump GitHub Actions workflow actions (#29219)
Fixes:

<img width="2186" alt="image"
src="https://github.com/microsoft/playwright/assets/17984549/e75b4319-a8d9-4784-8357-83611f2671ae">
2024-01-29 19:22:44 +01:00
Max Schmitt
cf70a01836
test: should serialize storageState with lone surrogates (#29089)
https://github.com/microsoft/playwright-dotnet/issues/2819
2024-01-29 19:22:33 +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
32034728ad
test: request overrides and routeFromHar (#29200)
Test that modifications from `route.fallback()` apply to the requests
before reading from/writing to HAR.

Reference https://github.com/microsoft/playwright/issues/29190
2024-01-26 15:19:01 -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
Gabriel Feo
12a9a308f8
chore: replace "node.js" mention in shared docs (#29119)
Remove "Node.js" mention from the shared part of docs, which are shown
in docs for Python and other platforms.
2024-01-25 16:53:25 -08:00
Max Schmitt
f741f08b3b test: fix itest (follow up to #28932) 2024-01-25 23:55:24 +01: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
Yury Semikhatsky
85c42939b1
devops: do not use broken overwrite: true for uploads (#29160)
Reverting parts of https://github.com/microsoft/playwright/pull/29080
related to use of overwrite: true as it is racy and
[fails](https://github.com/microsoft/playwright/actions/runs/7641699534/job/20819588957?pr=28932#step:10:63)
time to time with parallel jobs:


![image](https://github.com/microsoft/playwright/assets/9798949/cd484e2d-2875-4950-9247-5ea033c6e92d)


Reference https://github.com/actions/upload-artifact/issues/506
2024-01-25 12:55:29 -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
Yury Semikhatsky
f49426b006
docs: update browsers when updating playwright (#29128) 2024-01-24 21:54:03 -08: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
Max Schmitt
d50479a76f
devops: switch to ISO date string for Canary versions (#29142)
Fixes https://github.com/microsoft/playwright/issues/28906
2024-01-24 17:13:00 +01:00
Yury Semikhatsky
0752f0202f
docs: teardown examples (#29134)
Fixes https://github.com/microsoft/playwright/issues/29068
2024-01-23 16:35:30 -08:00
Yury Semikhatsky
ea855e232e
docs: update note on filtering dependent projects (#29135)
Fixes https://github.com/microsoft/playwright/issues/29102
2024-01-23 16:10:43 -08:00
Yury Semikhatsky
9cd2916623
docs: add a new fruit when mocking response (#29137)
Strawberry is already in the original list.

Fixes https://github.com/microsoft/playwright/issues/29114
2024-01-23 16:10:33 -08: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