-
-
Notifications
You must be signed in to change notification settings - Fork 354
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: ScrollScreenshot #1010
Feat: ScrollScreenshot #1010
Conversation
Good job! It will be great if you could add some tests. |
Review again, please allow me to make some weird mistakes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go run ./lib/utils/lint
will end normally now
@ysmood Please run CI again and it will almost succeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼
@ysmood Thank you for your patient help! |
Add ScrollScreenshot, for #1008