Skip to content

Commit e98ebce

Browse files
kblokMeir017
authored andcommitted
Add failing test for clicking certain elements (#1096)
1 parent 92e31db commit e98ebce

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/PuppeteerSharp.Tests/InputTests/ClickTests.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,21 @@ public async Task ShouldClickTheButtonIfWindowNodeIsRemoved()
3131
Assert.Equal("Clicked", await Page.EvaluateExpressionAsync("result"));
3232
}
3333

34+
[Fact(Skip = "See https://github.com/GoogleChrome/puppeteer/issues/4281")]
35+
public async Task ShouldClickOnASpanWithAnInlineElementInside()
36+
{
37+
await Page.SetContentAsync($@"
38+
<style>
39+
span::before {{
40+
content: 'q';
41+
}}
42+
</style>
43+
<span onclick='javascript:window.CLICKED=42'></span>
44+
");
45+
await Page.ClickAsync("span");
46+
Assert.Equal(42, await Page.EvaluateFunctionAsync<int>("() => window.CLICKED"));
47+
}
48+
3449
[Fact]
3550
public async Task ShouldClickTheButtonAfterNavigation()
3651
{

0 commit comments

Comments
 (0)