@@ -8,10 +8,6 @@ namespace PuppeteerSharp.Tests.ScreenshotTests
88{
99 public class ElementHandleScreenshotTests : PuppeteerPageBaseTest
1010 {
11- public ElementHandleScreenshotTests ( ) : base ( )
12- {
13- }
14-
1511 [ PuppeteerTest ( "screenshot.spec.ts" , "ElementHandle.screenshot" , "should work" ) ]
1612 [ PuppeteerTimeout ]
1713 public async Task ShouldWork ( )
@@ -149,7 +145,7 @@ public async Task ShouldFailToScreenshotADetachedElement()
149145 await Page . EvaluateFunctionAsync ( "element => element.remove()" , elementHandle ) ;
150146
151147 var exception = Assert . ThrowsAsync < PuppeteerException > ( elementHandle . ScreenshotStreamAsync ) ;
152- Assert . AreEqual ( "Node is either not visible or not an HTMLElement" , exception . Message ) ;
148+ Assert . AreEqual ( "Node is either not visible or not an HTMLElement" , exception ! . Message ) ;
153149 }
154150
155151 [ PuppeteerTest ( "screenshot.spec.ts" , "ElementHandle.screenshot" , "should not hang with zero width/height element" ) ]
@@ -159,7 +155,7 @@ public async Task ShouldNotHangWithZeroWidthHeightElement()
159155 await Page . SetContentAsync ( @"<div style='width: 50px; height: 0'></div>" ) ;
160156 var elementHandle = await Page . QuerySelectorAsync ( "div" ) ;
161157 var exception = Assert . ThrowsAsync < PuppeteerException > ( elementHandle . ScreenshotDataAsync ) ;
162- Assert . AreEqual ( "Node has 0 height." , exception . Message ) ;
158+ Assert . AreEqual ( "Node has 0 height." , exception ! . Message ) ;
163159 }
164160
165161 [ PuppeteerTest ( "screenshot.spec.ts" , "ElementHandle.screenshot" , "should work for an element with fractional dimensions" ) ]
0 commit comments