Skip to content

Thread freezes when using mouse scrolling #1156

Open
@quachquesh

Description

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")

Metadata

Assignees

No one assigned

    Labels

    questionQuestions related to rod

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions