Skip to content

Commit 97708c0

Browse files
authored
chore: roll driver to 1.59.1 (#3296)
1 parent 98434d0 commit 97708c0

16 files changed

Lines changed: 311 additions & 40 deletions

File tree

.claude/skills/playwright-roll/SKILL.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,20 @@ Rolling includes:
2929
- updating client implementation to match changes in the upstream JS implementation (see ../playwright/packages/playwright-core/src/client)
3030
- adding a couple of new tests to verify new/changed functionality
3131

32+
## Renaming generated types
33+
34+
When the API generator produces an unhelpful name for a return type (e.g. `Bind` instead of `BrowserBindResult`), you can control it by adding a struct alias in the upstream docs.
35+
36+
In the docs markdown file (e.g. `docs/src/api/class-browser.md`), change the return type from `<[Object]>` to `<[Object=DesiredName]>`:
37+
38+
```diff
39+
-- returns: <[Object]>
40+
+- returns: <[Object=BrowserBindResult]>
41+
- `endpoint` <[string]>
42+
```
43+
44+
The `=Name` syntax sets `structName` on the parsed type, which the .NET generator uses directly as the class name. After making this change, re-run `./build.sh --roll <version>` to regenerate, then update any hand-written implementation code to use the new type name.
45+
3246
## Tips & Tricks
3347
- Project checkouts are in the parent directory (`../`).
3448
- When updating checkboxes, store the issue content into /tmp and edit it there, then update the issue based on the file.

CLAUDE.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,41 @@ tail -5 /tmp/test-results.txt # summary
4343
- New channel object types require: enum entry in `ChannelOwnerType.cs`, case in `Connection.cs`, initializer in `Transport/Protocol/Generated/`, and a `Core/` class.
4444
- Public APIs should use .NET standard types (e.g. `IAsyncDisposable`) not custom Playwright types. Internal helpers (e.g. `Disposable` class in `Core/`) stay internal.
4545

46+
## Commit Convention
47+
48+
Before committing, run `dotnet format ./src/ -v:diag` and fix style issues.
49+
50+
Semantic commit messages: `label(scope): description`
51+
52+
Labels: `fix`, `feat`, `chore`, `docs`, `test`, `devops`
53+
54+
```bash
55+
git checkout -b fix-39562
56+
# ... make changes ...
57+
git add <changed-files>
58+
git commit -m "$(cat <<'EOF'
59+
fix(proxy): handle SOCKS proxy authentication
60+
61+
Fixes: https://github.com/microsoft/playwright/issues/39562
62+
EOF
63+
)"
64+
git push origin fix-39562
65+
gh pr create --repo microsoft/playwright --head username:fix-39562 \
66+
--title "fix(proxy): handle SOCKS proxy authentication" \
67+
--body "$(cat <<'EOF'
68+
## Summary
69+
- <describe the change very! briefly>
70+
71+
Fixes https://github.com/microsoft/playwright/issues/39562
72+
EOF
73+
)"
74+
```
75+
76+
Never add Co-Authored-By agents in commit message.
77+
Never add "Generated with" in commit message.
78+
Never add test plan to PR description. Keep PR description short — a few bullet points at most.
79+
Branch naming for issue fixes: `fix-<issue-number>`
80+
4681
## Commits
4782
- Do not include "co-authored" block in the commit message.
4883

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
| | Linux | macOS | Windows |
55
| :--- | :---: | :---: | :---: |
66
| Chromium <!-- GEN:chromium-version -->147.0.7727.15<!-- GEN:stop --> ||||
7-
| WebKit <!-- GEN:webkit-version -->26.0<!-- GEN:stop --> ||||
7+
| WebKit <!-- GEN:webkit-version -->26.4<!-- GEN:stop --> ||||
88
| Firefox <!-- GEN:firefox-version -->148.0.2<!-- GEN:stop --> ||||
99

1010
Playwright for .NET is the official language port of [Playwright](https://playwright.dev), the library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.

src/Common/Version.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<AssemblyVersion>1.58.0</AssemblyVersion>
44
<PackageVersion>$(AssemblyVersion)</PackageVersion>
5-
<DriverVersion>1.60.0-alpha-2026-03-31</DriverVersion>
5+
<DriverVersion>1.59.1</DriverVersion>
66
<ReleaseVersion>$(AssemblyVersion)</ReleaseVersion>
77
<FileVersion>$(AssemblyVersion)</FileVersion>
88
<NoDefaultExcludes>true</NoDefaultExcludes>

src/Playwright.TestingHarnessTest/package-lock.json

Lines changed: 23 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Playwright.TestingHarnessTest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "playwright.testingharnesstest",
33
"private": true,
44
"devDependencies": {
5-
"@playwright/test": "1.60.0-alpha-2026-03-31",
5+
"@playwright/test": "1.59.1",
66
"@types/node": "^22.12.0",
77
"fast-xml-parser": "^4.5.0"
88
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* MIT License
3+
*
4+
* Copyright (c) Microsoft Corporation.
5+
*
6+
* Permission is hereby granted, free of charge, to any person obtaining a copy
7+
* of this software and associated documentation files (the "Software"), to deal
8+
* in the Software without restriction, including without limitation the rights
9+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
* copies of the Software, and to permit persons to whom the Software is
11+
* furnished to do so, subject to the following conditions:
12+
*
13+
* The above copyright notice and this permission notice shall be included in all
14+
* copies or substantial portions of the Software.
15+
*
16+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
* SOFTWARE.
23+
*/
24+
25+
using System.Runtime.Serialization;
26+
27+
namespace Microsoft.Playwright;
28+
29+
public enum AnnotatePosition
30+
{
31+
[EnumMember(Value = "top-left")]
32+
TopLeft,
33+
[EnumMember(Value = "top")]
34+
Top,
35+
[EnumMember(Value = "top-right")]
36+
TopRight,
37+
[EnumMember(Value = "bottom-left")]
38+
BottomLeft,
39+
[EnumMember(Value = "bottom")]
40+
Bottom,
41+
[EnumMember(Value = "bottom-right")]
42+
BottomRight,
43+
}

src/Playwright/API/Generated/IBrowser.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,19 @@ public partial interface IBrowser
170170
/// <param name="options">Call options</param>
171171
Task<IPage> NewPageAsync(BrowserNewPageOptions? options = default);
172172

173+
/// <summary>
174+
/// <para>
175+
/// Binds the browser to a named pipe or web socket, making it available for other clients
176+
/// to connect to.
177+
/// </para>
178+
/// </summary>
179+
/// <param name="title">Title of the browser server, used for identification.</param>
180+
/// <param name="options">Call options</param>
181+
Task<BrowserBindResult> BindAsync(string title, BrowserBindOptions? options = default);
182+
183+
/// <summary><para>Unbinds the browser server previously bound with <see cref="IBrowser.BindAsync"/>.</para></summary>
184+
Task UnbindAsync();
185+
173186
/// <summary><para>Returns the browser version.</para></summary>
174187
string Version { get; }
175188
}

src/Playwright/API/Generated/IPage.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2327,6 +2327,12 @@ public partial interface IPage
23272327
/// <param name="handler">Handler function to route the WebSocket.</param>
23282328
Task RouteWebSocketAsync(Func<string, bool> url, Action<IWebSocketRoute> handler);
23292329

2330+
/// <summary>
2331+
/// <para><see cref="IScreencast"/> object associated with this page.</para>
2332+
/// <para>**Usage**</para>
2333+
/// </summary>
2334+
public IScreencast Screencast { get; }
2335+
23302336
/// <summary><para>Returns the buffer with the captured screenshot.</para></summary>
23312337
/// <param name="options">Call options</param>
23322338
Task<byte[]> ScreenshotAsync(PageScreenshotOptions? options = default);

src/Playwright/API/Generated/IScreencast.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,21 @@ public partial interface IScreencast
7070
/// <param name="options">Call options</param>
7171
Task ShowChapterAsync(string title, ScreencastShowChapterOptions? options = default);
7272

73+
/// <summary>
74+
/// <para>
75+
/// Enables visual annotations on interacted elements. Returns a disposable that stops
76+
/// showing actions when disposed.
77+
/// </para>
78+
/// </summary>
79+
/// <param name="options">Call options</param>
80+
Task<IAsyncDisposable> ShowActionsAsync(ScreencastShowActionsOptions? options = default);
81+
7382
/// <summary><para>Shows overlays.</para></summary>
7483
Task ShowOverlaysAsync();
7584

85+
/// <summary><para>Removes action decorations.</para></summary>
86+
Task HideActionsAsync();
87+
7688
/// <summary><para>Hides overlays without removing them.</para></summary>
7789
Task HideOverlaysAsync();
7890
}

0 commit comments

Comments
 (0)