Skip to content

Running JavaScript (Eval, MustEval) #354

Discussion options

You must be logged in to vote

Well, I understand you can't execute such JavaScript, albeit it was possible on ChromeDP.
I have rewrote it, works as intended :-)

        left := page.MustEval("$('.uclw_noUi-base').offset().left").Int()
	top := page.MustEval("$('.uclw_noUi-base').offset().top").Int()
	mouse := page.Mouse

	mouse.Move(float64(left), float64(top), 2)
	mouse.MustDown(proto.InputMouseButtonLeft)
	mouse.MustUp(proto.InputMouseButtonLeft)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by MikhailKlemin
Comment options

You must be logged in to vote
1 reply
@MikhailKlemin
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants