diff --git a/PuppeteerSharp.Dom.Tests/ElementHandleTests/ClickTests.cs b/PuppeteerSharp.Dom.Tests/ElementHandleTests/ClickTests.cs index 42843a2..ee02c1d 100644 --- a/PuppeteerSharp.Dom.Tests/ElementHandleTests/ClickTests.cs +++ b/PuppeteerSharp.Dom.Tests/ElementHandleTests/ClickTests.cs @@ -37,7 +37,7 @@ public async Task ShouldThrowForDetachedNodes() var button = await Page.QuerySelectorAsync("button"); await button.RemoveAsync(); var exception = await Assert.ThrowsAsync(async () => await button.ClickAsync()); - Assert.Equal("Node is either not visible or not an HTMLElement", exception.Message); + Assert.Equal("Node is detached from document", exception.Message); } [PuppeteerDomFact] @@ -49,7 +49,7 @@ await button.GetStyleAsync() .AndThen(x => x.SetPropertyAsync("display", "none")); //await Page.EvaluateFunctionAsync("button => button.style.display = 'none'", (JSHandle)button); var exception = await Assert.ThrowsAsync(async () => await button.ClickAsync()); - Assert.Equal("Node is either not visible or not an HTMLElement", exception.Message); + Assert.Equal("Node is either not clickable or not an Element", exception.Message); } [PuppeteerDomFact] @@ -61,7 +61,7 @@ await button.GetParentElementAsync() .AndThen(x => x.GetStyleAsync()) .AndThen(x => x.SetPropertyAsync("display", "none")); var exception = await Assert.ThrowsAsync(async () => await button.ClickAsync()); - Assert.Equal("Node is either not visible or not an HTMLElement", exception.Message); + Assert.Equal("Node is either not clickable or not an Element", exception.Message); } [PuppeteerDomFact] @@ -70,7 +70,7 @@ public async Task ShouldThrowForBrElements() await Page.SetContentAsync("hello
goodbye"); var br = await Page.QuerySelectorAsync("br"); var exception = await Assert.ThrowsAsync(async () => await br.ClickAsync()); - Assert.Equal("Node is either not visible or not an HTMLElement", exception.Message); + Assert.Equal("Node is either not clickable or not an Element", exception.Message); } } }