Skip to content

Commit b04835b

Browse files
authored
feat: roll to driver v1.54.0-alpha-2025-07-08 (#3197)
1 parent ff919de commit b04835b

34 files changed

+217
-368
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 -->138.0.7204.23<!-- GEN:stop --> ||||
6+
| Chromium <!-- GEN:chromium-version -->139.0.7258.5<!-- GEN:stop --> ||||
77
| WebKit <!-- GEN:webkit-version -->18.5<!-- GEN:stop --> ||||
8-
| Firefox <!-- GEN:firefox-version -->139.0<!-- GEN:stop --> ||||
8+
| Firefox <!-- GEN:firefox-version -->140.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.53.0</AssemblyVersion>
44
<PackageVersion>$(AssemblyVersion)</PackageVersion>
5-
<DriverVersion>1.53.1</DriverVersion>
5+
<DriverVersion>1.54.0-alpha-2025-07-08</DriverVersion>
66
<ReleaseVersion>$(AssemblyVersion)</ReleaseVersion>
77
<FileVersion>$(AssemblyVersion)</FileVersion>
88
<NoDefaultExcludes>true</NoDefaultExcludes>

src/Playwright.TestingHarnessTest/package-lock.json

Lines changed: 23 additions & 27 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.53.1",
5+
"@playwright/test": "1.54.0-alpha-2025-07-08",
66
"@types/node": "^22.12.0",
77
"fast-xml-parser": "^4.5.0"
88
}

src/Playwright.Tests/BrowserContextBasicTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,11 @@ public async Task ShouldRespectDeviceScaleFactor()
145145
{
146146
await using var context = await Browser.NewContextAsync(new()
147147
{
148-
DeviceScaleFactor = 3
148+
DeviceScaleFactor = 3.5F
149149
});
150150

151151
var page = await context.NewPageAsync();
152-
Assert.AreEqual(3, await page.EvaluateAsync<int>("window.devicePixelRatio"));
152+
Assert.AreEqual(3.5F, await page.EvaluateAsync<float>("window.devicePixelRatio"));
153153
}
154154

155155
[PlaywrightTest("browsercontext-basic.spec.ts", "should not allow deviceScaleFactor with null viewport")]

src/Playwright.Tests/BrowserContextFetchTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,8 +607,8 @@ public async Task ShouldSupportTimeoutOption()
607607
{
608608
await Task.Delay(5000);
609609
});
610-
var exception = await PlaywrightAssert.ThrowsAsync<PlaywrightException>(async () => await Context.APIRequest.GetAsync(Server.Prefix + "/slow", new() { Timeout = 10 }));
611-
StringAssert.Contains("Request timed out after 10ms", exception.Message);
610+
var exception = await PlaywrightAssert.ThrowsAsync<TimeoutException>(() => Context.APIRequest.GetAsync(Server.Prefix + "/slow", new() { Timeout = 1000 }));
611+
StringAssert.Contains("Timeout 1000ms exceeded", exception.Message);
612612
}
613613

614614
[PlaywrightTest("browsercontext-fetch.spec.ts", "should dispose")]

src/Playwright.Tests/GeolocationTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ await Context.SetGeolocationAsync(new()
7272
await using var context2 = await Browser.NewContextAsync(new()
7373
{
7474
Permissions = new[] { "geolocation" },
75-
Geolocation = new() { Latitude = 20, Longitude = 20 },
75+
Geolocation = new() { Latitude = 10.5F, Longitude = 11.5F },
7676
});
7777

7878
var page2 = await context2.NewPageAsync();
@@ -88,7 +88,7 @@ await Context.SetGeolocationAsync(new()
8888
@"() => new Promise(resolve => navigator.geolocation.getCurrentPosition(position => {
8989
resolve({latitude: position.coords.latitude, longitude: position.coords.longitude});
9090
}))");
91-
AssertEqual(20, 20, geolocation2);
91+
AssertEqual(10.5F, 11.5F, geolocation2);
9292
}
9393

9494
[PlaywrightTest("geolocation.spec.ts", "should not modify passed default options object")]

src/Playwright.Tests/GlobalFetchTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ public async Task ShouldSupportGlobalTimeoutOption()
8181
{
8282
var request = await Playwright.APIRequest.NewContextAsync(new() { Timeout = 100 });
8383
Server.SetRoute("/empty.html", async request => await Task.Delay(5_000));
84-
var exception = Assert.ThrowsAsync<PlaywrightException>(() => request.GetAsync(Server.EmptyPage));
85-
StringAssert.Contains("Request timed out after 100ms", exception.Message);
84+
var exception = Assert.ThrowsAsync<TimeoutException>(() => request.GetAsync(Server.EmptyPage));
85+
StringAssert.Contains("Timeout 100ms exceeded", exception.Message);
8686
await request.DisposeAsync();
8787
}
8888

src/Playwright.Tests/InterceptionTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@ bool URLMatches(string baseURL, string url, string glob)
100100
Assert.True(URLMatches("http://playwright.dev/foo", "http://playwright.dev/foo?bar", "\\\\?bar"));
101101
Assert.True(URLMatches("http://first.host/", "http://second.host/foo", "**/foo"));
102102
Assert.True(URLMatches("http://playwright.dev/", "http://localhost/", "*//localhost/"));
103+
104+
// Should work with baseURL and various non-http schemes.
105+
Assert.True(URLMatches("http://playwright.dev/", "about:blank", "about:blank"));
106+
Assert.False(URLMatches("http://playwright.dev/", "about:blank", "http://playwright.dev/"));
107+
Assert.True(URLMatches("http://playwright.dev/", "about:blank", "about:*"));
108+
Assert.True(URLMatches("http://playwright.dev/", "data:text/html,", "data:*/*"));
109+
Assert.True(URLMatches("http://playwright.dev/", "file://path/to/file", "file://**"));
103110
}
104111

105112
[PlaywrightTest("interception.spec.ts", "should intercept by glob")]

src/Playwright.Tests/PageAddLocatorHandlerTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ await Page.EvaluateAsync(@"() =>
324324
}");
325325
var error = await PlaywrightAssert.ThrowsAsync<TimeoutException>(() => Page.Locator("#target").ClickAsync(new() { Timeout = 3000 }));
326326
Assert.AreEqual(0, await Page.EvaluateAsync<int>("window.clicked"));
327-
await Expect(Page.Locator("#interstitial")).ToBeVisibleAsync();
327+
Assert.True(await Page.Locator("#interstitial").IsVisibleAsync());
328328
Assert.AreEqual(1, called);
329329
StringAssert.Contains("locator handler has finished, waiting for GetByRole(AriaRole.Button, new() { Name = \"close\" }) to be hidden", error.Message);
330330
}

0 commit comments

Comments
 (0)