Skip to content
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

Thread freezes when using mouse scrolling #1156

Open
quachquesh opened this issue Nov 29, 2024 · 1 comment
Open

Thread freezes when using mouse scrolling #1156

quachquesh opened this issue Nov 29, 2024 · 1 comment
Labels
question Questions related to rod

Comments

@quachquesh
Copy link

quachquesh commented Nov 29, 2024

Rod Version: v0.116.2

I'm running 10 threads simultaneously, and I encounter a freeze when using Mouse.MustScroll(0, 100). Is this a bug? How can I resolve it? Thank you.

I've tried using cancel, but it didn't work. Here's my code:

page := rod.New().MustConnect().MustPage()

ctx, cancel := context.WithCancel(context.Background())
pageWithCancel := page.Context(ctx)

go func() {
    time.Sleep(2 * time.Second)
    cancel()
}()

fmt.Println("[Start] mouse scroll")
pageWithCancel.Mouse.MustScroll(0, 100)
fmt.Println("[End] mouse scroll")
@quachquesh quachquesh added the question Questions related to rod label Nov 29, 2024
@quachquesh quachquesh changed the title Process freezes when using mouse scrolling Thread freezes when using mouse scrolling Nov 29, 2024
@rpdg
Copy link

rpdg commented Dec 20, 2024

maybe we can use JS function instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions related to rod
Projects
None yet
Development

No branches or pull requests

2 participants