Skip to content

Commit 079309b

Browse files
kblokMeir017
authored andcommitted
Add a failing test that tries to click a fixed button in an iframe (#1055)
1 parent 9f5e104 commit 079309b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

lib/PuppeteerSharp.Tests/InputTests/ClickTests.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,23 @@ public async Task ShouldClickTheButtonInsideAnIframe()
228228
Assert.Equal("Clicked", await frame.EvaluateExpressionAsync<string>("window.result"));
229229
}
230230

231+
[Fact(Skip = "see https://github.com/GoogleChrome/puppeteer/issues/4110")]
232+
public async Task ShouldClickTheButtonWithFixedPositionInsideAnIframe()
233+
{
234+
await Page.GoToAsync(TestConstants.EmptyPage);
235+
await Page.SetViewportAsync(new ViewPortOptions
236+
{
237+
Width = 500,
238+
Height = 500
239+
});
240+
await Page.SetContentAsync("<div style=\"width:100px;height:2000px\">spacer</div>");
241+
await FrameUtils.AttachFrameAsync(Page, "button-test", TestConstants.ServerUrl + "/input/button.html");
242+
var frame = Page.FirstChildFrame();
243+
await frame.QuerySelectorAsync("button").EvaluateFunctionAsync("button => button.style.setProperty('position', 'fixed')");
244+
await frame.ClickAsync("button");
245+
Assert.Equal("Clicked", await frame.EvaluateExpressionAsync<string>("window.result"));
246+
}
247+
231248
[Fact]
232249
public async Task ShouldClickTheButtonWithDeviceScaleFactorSet()
233250
{

0 commit comments

Comments
 (0)