Skip to content

Commit 44d72fd

Browse files
committed
chore: roll to 1.57.0-beta-1763739794000
1 parent 64d7b65 commit 44d72fd

39 files changed

+510
-321
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33

44
| | Linux | macOS | Windows |
55
| :--- | :---: | :---: | :---: |
6-
| Chromium <!-- GEN:chromium-version -->141.0.7390.37<!-- GEN:stop --> ||||
6+
| Chromium <!-- GEN:chromium-version -->143.0.7499.4<!-- GEN:stop --> ||||
77
| WebKit <!-- GEN:webkit-version -->26.0<!-- GEN:stop --> ||||
8-
| Firefox <!-- GEN:firefox-version -->142.0.1<!-- GEN:stop --> ||||
8+
| Firefox <!-- GEN:firefox-version -->144.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**.
1111

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.56.0</AssemblyVersion>
44
<PackageVersion>$(AssemblyVersion)</PackageVersion>
5-
<DriverVersion>1.56.1</DriverVersion>
5+
<DriverVersion>1.57.0-beta-1763739794000</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.56.1",
5+
"@playwright/test": "1.57.0-beta-1763739794000",
66
"@types/node": "^22.12.0",
77
"fast-xml-parser": "^4.5.0"
88
}

src/Playwright.Tests/BrowserContextTimezoneIdTests.cs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ public async Task ShouldWork()
4949
await page.EvaluateAsync<string>(func));
5050
}
5151

52-
await using (var context = await browser.NewContextAsync(new() { TimezoneId = "America/Buenos_Aires", Locale = "en-US" }))
52+
var buenosAires = BrowserName == "firefox" ? "America/Argentina/Buenos_Aires" : "America/Buenos_Aires";
53+
await using (var context = await browser.NewContextAsync(new() { TimezoneId = buenosAires, Locale = "en-US" }))
5354
{
5455
var page = await context.NewPageAsync();
5556
Assert.AreEqual(
@@ -69,16 +70,16 @@ public async Task ShouldWork()
6970
[PlaywrightTest("browsercontext-timezone-id.spec.ts", "should throw for invalid timezone IDs")]
7071
public async Task ShouldThrowForInvalidTimezoneId()
7172
{
72-
await using (var context = await Browser.NewContextAsync(new() { TimezoneId = "Foo/Bar" }))
73+
IBrowserContext context = null;
74+
var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(async () =>
7375
{
74-
var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => context.NewPageAsync());
75-
StringAssert.Contains("Invalid timezone ID: Foo/Bar", exception.Message);
76-
}
77-
78-
await using (var context = await Browser.NewContextAsync(new() { TimezoneId = "Baz/Qux" }))
76+
context = await Browser.NewContextAsync(new() { TimezoneId = "Foo/Bar" });
77+
await context.NewPageAsync();
78+
});
79+
StringAssert.Contains("Invalid timezone ID: Foo/Bar", exception.Message);
80+
if (context != null)
7981
{
80-
var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(() => context.NewPageAsync());
81-
StringAssert.Contains("Invalid timezone ID: Baz/Qux", exception.Message);
82+
await context.CloseAsync();
8283
}
8384
}
8485

src/Playwright.Tests/InterceptionTests.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ bool URLMatches(string baseURL, string url, string glob)
6464
Assert.That("http://localhost:3000/signin-oidc/foo", Does.Not.Match(GlobToRegex("http://localhost:3000/signin-oidc*")));
6565
Assert.That("http://localhost:3000/signin-oidcnice", Does.Match(GlobToRegex("http://localhost:3000/signin-oidc*")));
6666

67+
Assert.That("/foo.js", Does.Match(GlobToRegex("**/*.js")));
68+
Assert.That("/foo.js", Does.Not.Match(GlobToRegex("asd/**.js")));
69+
Assert.That("bar_foo.js", Does.Not.Match(GlobToRegex("**/*.js")));
70+
6771
// range [] is NOT supported
6872
Assert.That("http://example.com/api/v[0-9]", Does.Match(GlobToRegex("**/api/v[0-9]")));
6973
Assert.That("http://example.com/api/version", Does.Not.Match(GlobToRegex("**/api/v[0-9]")));
@@ -99,6 +103,12 @@ bool URLMatches(string baseURL, string url, string glob)
99103
Assert.True(URLMatches(null, "https://localhost:3000/?a=b", "**?a=b"));
100104
Assert.True(URLMatches(null, "https://localhost:3000/?a=b", "**=b"));
101105

106+
// Custom schema.
107+
Assert.True(URLMatches(null, "my.custom.protocol://foo", "my.custom.protocol://**"));
108+
Assert.False(URLMatches(null, "my.p://foo", "my.{p,y}://**"));
109+
Assert.True(URLMatches(null, "my.p://foo/", "my.{p,y}://**"));
110+
Assert.True(URLMatches(null, "file:///foo/", "f*e://**"));
111+
102112
// This is not supported, we treat ? as a query separator.
103113
Assert.That("http://localhost:8080/Simple/path.js", Does.Not.Match(GlobToRegex("http://localhost:8080/?imple/path.js")));
104114
Assert.False(URLMatches(null, "http://playwright.dev/", "http://playwright.?ev"));
@@ -112,6 +122,10 @@ bool URLMatches(string baseURL, string url, string glob)
112122
Assert.True(URLMatches("http://first.host/", "http://second.host/foo", "**/foo"));
113123
Assert.True(URLMatches("http://playwright.dev/", "http://localhost/", "*//localhost/"));
114124

125+
// /**/ should match /.
126+
Assert.True(URLMatches(null, "https://foo/bar.js", "https://foo/**/bar.js"));
127+
Assert.True(URLMatches(null, "https://foo/bar.js", "https://foo/**/**/bar.js"));
128+
115129
// Should work with baseURL and various non-http schemes.
116130
Assert.True(URLMatches("http://playwright.dev/", "about:blank", "about:blank"));
117131
Assert.False(URLMatches("http://playwright.dev/", "about:blank", "http://playwright.dev/"));

src/Playwright.Tests/Locator/LocatorMisc2Tests.cs

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,43 @@ await Page.SetContentAsync(@"
233233
Assert.AreEqual("outer", await divLocator.Locator("input").InputValueAsync());
234234
Assert.AreEqual("inner", await Page.FrameLocator("iframe").Locator(divLocator).Locator("input").InputValueAsync());
235235
}
236+
237+
[PlaywrightTest("locator-convenience.spec.ts", "description should return null for locator without description")]
238+
public void DescriptionShouldReturnNullForLocatorWithoutDescription()
239+
{
240+
var locator = Page.Locator("button");
241+
Assert.IsNull(locator.Description);
242+
}
243+
244+
[PlaywrightTest("locator-convenience.spec.ts", "description should return description for locator with simple description")]
245+
public void DescriptionShouldReturnDescriptionForLocatorWithSimpleDescription()
246+
{
247+
var locator = Page.Locator("button").Describe("Submit button");
248+
Assert.AreEqual("Submit button", locator.Description);
249+
}
250+
251+
[PlaywrightTest("locator-convenience.spec.ts", "description should return description with special characters")]
252+
public void DescriptionShouldReturnDescriptionWithSpecialCharacters()
253+
{
254+
var locator = Page.Locator("div").Describe("Button with \"quotes\" and 'apostrophes'");
255+
Assert.AreEqual("Button with \"quotes\" and 'apostrophes'", locator.Description);
256+
}
257+
258+
[PlaywrightTest("locator-convenience.spec.ts", "description should return description for chained locators")]
259+
public void DescriptionShouldReturnDescriptionForChainedLocators()
260+
{
261+
var locator = Page.Locator("form").Locator("input").Describe("Form input field");
262+
Assert.AreEqual("Form input field", locator.Description);
263+
}
264+
265+
[PlaywrightTest("locator-convenience.spec.ts", "description should return description for locator with multiple describe calls")]
266+
public void DescriptionShouldReturnDescriptionForLocatorWithMultipleDescribeCalls()
267+
{
268+
var locator1 = Page.Locator("foo").Describe("First description");
269+
Assert.AreEqual("First description", locator1.Description);
270+
var locator2 = locator1.Locator("button").Describe("Second description");
271+
Assert.AreEqual("Second description", locator2.Description);
272+
var locator3 = locator2.Locator("button");
273+
Assert.IsNull(locator3.Description);
274+
}
236275
}

src/Playwright.Tests/PageAccessibilityTests.cs

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/Playwright.Tests/PageClickTests.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -938,6 +938,37 @@ public async Task ShouldClickTheButtonWhenWindowInnerWidthIsCorrupted()
938938
Assert.AreEqual("Clicked", await Page.EvaluateAsync<string>("result"));
939939
}
940940

941+
[PlaywrightTest("page-click.spec.ts", "should click with tweened mouse movement")]
942+
public async Task ShouldClickWithTweenedMouseMovement()
943+
{
944+
await Page.SetContentAsync($@"
945+
<body style=""margin: 0; padding: 0; height: 500px; width: 500px;"">
946+
<div style=""position: relative; top: 280px; left: 150px; width: 100px; height: 40px"">Click me</div>
947+
</body>
948+
");
949+
if (BrowserName == "webkit")
950+
{
951+
await Page.EvaluateAsync("() => new Promise(requestAnimationFrame)");
952+
}
953+
await Page.Mouse.MoveAsync(100, 100);
954+
await Page.EvaluateAsync(@"() => {
955+
window['result'] = [];
956+
document.addEventListener('mousemove', event => {
957+
window['result'].push([event.clientX, event.clientY]);
958+
});
959+
}");
960+
// Centerpoint at 150 + 100/2, 280 + 40/2 = 200, 300
961+
await Page.Locator("div").ClickAsync(new() { Steps = 5 });
962+
Assert.AreEqual(await Page.EvaluateAsync<int[][]>("result"), new int[][]
963+
{
964+
new int[] {120, 140},
965+
new int[] {140, 180},
966+
new int[] {160, 220},
967+
new int[] {180, 260},
968+
new int[] {200, 300}
969+
});
970+
}
971+
941972
private async Task GiveItAChanceToClick(IPage page)
942973
{
943974
for (int i = 0; i < 5; i++)

0 commit comments

Comments
 (0)