File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
lib/PuppeteerSharp.Tests/FrameTests Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -112,6 +112,21 @@ public async Task ShouldDetachChildFramesOnNavigation()
112112 Assert . Single ( navigatedFrames ) ;
113113 }
114114
115+ [ Fact ]
116+ public async Task ShouldReportFrameFromInsideShadowDOM ( )
117+ {
118+ await Page . GoToAsync ( TestConstants . ServerUrl + "/shadow.html" ) ;
119+ await Page . EvaluateFunctionAsync ( @"async url =>
120+ {
121+ const frame = document.createElement('iframe');
122+ frame.src = url;
123+ document.body.shadowRoot.appendChild(frame);
124+ await new Promise(x => frame.onload = x);
125+ }" , TestConstants . EmptyPage ) ;
126+ Assert . Equal ( 2 , Page . Frames . Length ) ;
127+ Assert . Single ( Page . Frames , frame => frame . Url == TestConstants . EmptyPage ) ;
128+ }
129+
115130 [ Fact ]
116131 public async Task ShouldReportFrameName ( )
117132 {
You can’t perform that action at this time.
0 commit comments