Publish Browser.Get|SetWindowBounds and Page.WindowId (#14494)#3131
Merged
Publish Browser.Get|SetWindowBounds and Page.WindowId (#14494)#3131
Conversation
…IdAsync (#14494) Port upstream Puppeteer PR #14494 which adds browser window management methods. These allow users to get and set browser window position, size, and state (normal/minimized/maximized/fullscreen). - Add WindowBounds class and WindowState enum - Add GetWindowBoundsAsync/SetWindowBoundsAsync to IBrowser/Browser - Add WindowIdAsync to IPage/Page - Implement CDP protocol: Browser.getWindowBounds, Browser.setWindowBounds - Implement BiDi protocol: browser.getClientWindows, browser.setClientWindowState - Refactor CdpPage.ResizeAsync to use WindowIdAsync - Add BrowsingContext.WindowId for BiDi protocol - Add test and upstream test expectations Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… #14494 tests - Add CreatePageOptions and CreatePageType for window/tab page creation - Add NewPageAsync(CreatePageOptions) to IBrowserContext/BrowserContext - Implement in CdpBrowserContext and BidiBrowserContext - Extend TargetCreateTargetRequest with window bounds and background params - Update WindowBoundsTests to use CreatePageOptions matching upstream - Add ShouldSetAndGetBrowserWindowMaximizedState test - Add NewPageTests (window, position, maximized state, background page) - Merge with master's screen management (ScreensAsync, AddScreenAsync, RemoveScreenAsync) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…#14547) - Merge master's background page creation support (BiDi UserContext.CreateBrowserContextAsync with background param) - Use CreatePageType enum for Type property instead of raw string - Single NewPageAsync(CreatePageOptions options = null) method signature - Add [JsonIgnore(WhenWritingNull)] to TargetCreateTargetRequest nullable properties - Background page test now uses PuppeteerPageBaseTest and Context directly - Remove local test expectation for background page (now works with master's impl) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This was referenced Feb 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Browser.getWindowBounds/setWindowBoundsandPage.windowIdAPIsWindowBoundsclass andWindowStateenum to represent browser window dimensions and stateBrowser.getWindowBounds,Browser.setWindowBounds, andBrowser.getWindowForTargetcommandsbrowser.getClientWindowsandbrowser.setClientWindowStatecommands with state mappingCdpPage.ResizeAsyncto reuse the newWindowIdAsync()methodWindowBoundsTestswith the upstream test for get/set window boundsChanges
WindowState.csWindowBounds.csIBrowser.cs/Browser.csGetWindowBoundsAsyncandSetWindowBoundsAsyncabstract methodsIPage.cs/Page.csWindowIdAsyncabstract methodCdpBrowser.csCdpPage.csBidiBrowser.csBidiPage.csBrowsingContext.csUserContext.csWindowBoundsTests.csTestExpectations.upstream.jsonTest plan
WindowBoundsTests.ShouldGetAndSetBrowserWindowBoundspasses on Chrome+CDPResizeTestscontinue to pass (refactored to use newWindowIdAsync)BrowserTestssuite passes without regressions🤖 Generated with Claude Code