File tree Expand file tree Collapse file tree
packages/playwright-core/src/server/chromium Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -441,8 +441,13 @@ class FrameSession {
441441 if ( ! this . _page . isStorageStatePage && hasUIWindow &&
442442 ! this . _crPage . _browserContext . _browser . isClank ( ) &&
443443 ! this . _crPage . _browserContext . _options . noDefaultViewport ) {
444- const { windowId } = await this . _client . send ( 'Browser.getWindowForTarget' ) ;
445- this . _windowId = windowId ;
444+ try {
445+ const { windowId } = await this . _client . send ( 'Browser.getWindowForTarget' ) ;
446+ this . _windowId = windowId ;
447+ } catch {
448+ // Some pages in Edge, like internal UIs, are mis-classified as "page", but do
449+ // not actually have a browser window. That's fine, we won't resize them.
450+ }
446451 }
447452
448453 if ( this . _isMainFrame ( ) && hasUIWindow && ! this . _page . isStorageStatePage )
You can’t perform that action at this time.
0 commit comments