File tree Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Expand file tree Collapse file tree 2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,10 @@ func (s *S) TestScreenshotFullPage() {
410
410
res = p .Eval (`({w: innerWidth, h: innerHeight})` )
411
411
s .EqualValues (800 , res .Get ("w" ).Int ())
412
412
s .EqualValues (600 , res .Get ("h" ).Int ())
413
+
414
+ kit .E (kit .Remove (slash ("tmp/screenshots" )))
415
+ p .ScreenshotFullPage ("" )
416
+ s .Len (kit .Walk (slash ("tmp/screenshots/*" )).MustList (), 1 )
413
417
}
414
418
415
419
func (s * S ) TestScreenshotFullPageInit () {
Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ func (p *Page) Screenshot(toFile ...string) []byte {
212
212
func (p * Page ) ScreenshotFullPage (toFile ... string ) []byte {
213
213
bin , err := p .ScreenshotE (true , & proto.PageCaptureScreenshot {})
214
214
kit .E (err )
215
+ kit .E (saveScreenshot (bin , toFile ))
215
216
return bin
216
217
}
217
218
You can’t perform that action at this time.
0 commit comments