chore: roll to 1.53.0-beta-1749131401000#3187
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR bumps the version to 1.53.0-beta-1749131401000 and refactors internal APIs for improved error messaging and consistency across browser and page handling. Key changes include updates to the video recording and HAR recording options, conversion of API calls to use new error message titles, and renaming of internal flags to better reflect state.
Reviewed Changes
Copilot reviewed 44 out of 45 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/Playwright/Core/Page.cs | Updated null checks and replaced Context.CloseWasCalled with ClosingOrClosed for clarity. |
| src/Playwright/Core/Mouse.cs | Refactored DblClickAsync to wrap API calls with an explicit title. |
| src/Playwright/Core/Locator.cs | Added title parameters to WithElementAsync calls and adjusted ExpectAsync signatures. |
| src/Playwright/Core/LocalUtils.cs | Removed the call to MarkAsInternalType for internal type management. |
| src/Playwright/Core/BrowserType.cs | Replaced DidLaunchBrowser with ConnectToBrowserType and updated HAR options handling. |
| src/Playwright/Core/BrowserContext.cs | Replaced CloseWasCalled with ClosingOrClosed and refactored HAR recording initialization. |
| src/Playwright/Core/Browser.cs | Updated context creation and browser connection handling to use the new APIs. |
| Tests and package files | Updated expected error message texts and bumped version numbers accordingly. |
Files not reviewed (1)
- src/Playwright.TestingHarnessTest/package-lock.json: Language not supported
Comments suppressed due to low confidence (4)
src/Playwright/Core/AssertionsBase.cs:165
- Consider providing a fallback or a more descriptive error message for unknown expect expressions to help developers diagnose missing mappings instead of immediately throwing an exception.
throw new PlaywrightException($"Unknown expect expression: {expression}");
src/Playwright/Core/Page.cs:1313
- Ensure that the change from 'CloseWasCalled' to 'ClosingOrClosed' is consistently applied and documented across both page and context usage for clarity in tracking closure state.
if (CloseWasCalled || Context.ClosingOrClosed)
src/Playwright/Core/BrowserType.cs:154
- Review the new handling of HAR recording options and the JSON structure being sent to ensure compatibility with existing consumers and that the updated structure meets all expected behaviors.
JsonElement result = await SendMessageToServerAsync<JsonElement>("launchPersistentContext", channelArgs).ConfigureAwait(false);
src/Playwright/Core/LocalUtils.cs:38
- Confirm that removing the call to MarkAsInternalType does not adversely affect internal type resolution or related reflection‐based operations.
MarkAsInternalType();
| Assert.AreEqual(0, context.Pages.Count); | ||
| // Next line should not throw. | ||
| await context.CloseAsync(); | ||
| tmp.Dispose(); |
There was a problem hiding this comment.
Would be nice to follow-up that tmp.Dispose so it uses await using.
There was a problem hiding this comment.
Unresolving so we can act on it afterwards.
| "BrowserContext.newPage", | ||
| "Frame.goto", | ||
| "Frame.setContent", | ||
| "BrowserContext.waitForEventInfo", |
There was a problem hiding this comment.
not a strong fan of this waitForEventInfo here, since its internal! It should stay RunAndWaitForPageAsync or something related to that.
| public Core.Tracing Tracing { get; set; } = null!; | ||
|
|
||
| [JsonPropertyName("options")] | ||
| public Options Options { get; set; } = null!; |
There was a problem hiding this comment.
nit: would be great to rename
32c42c8 to
6260823
Compare
References #3149.