Closed zbysir closed 7 months ago
Good job! It will be great if you could add some tests.
Good job! It will be great if you could add some tests.
Review again, please allow me to make some weird mistakes.
Please fix the lint error in CI, you can check it on your local first
go run ./lib/utils/lint
.The test doesn't work on Mac and Windows: https://github.com/go-rod/rod/actions/runs/7751056459/job/21138412821?pr=1010#step:4:25
Yes, I fixed it. Done.
Please check the CI, if you need help let me know.
@ysmood Need help:
The test code cannot cover the error branch below
err = p.WaitStable(opt.WaitPreScroll)
if err != nil {
return nil, fmt.Errorf("waitStable error: %w", err)
}
I don't know how to fix it, I tried the test code below but it doesn't work
g.Panic(func() {
// mock error for WaitStable
g.mc.stubErr(1, proto.DOMSnapshotCaptureSnapshot{})
p.MustScrollScreenshotPage()
})
Do you have any plans? Or is it appropriate for me to use time.Sleep() directly?
@ysmood Please run CI again and it will almost succeed.
@ysmood Thank you for your patient help!
Add ScrollScreenshot, for https://github.com/go-rod/rod/issues/1008