go-rod / rod

A Chrome DevTools Protocol driver for web automation and scraping.
https://go-rod.github.io
MIT License
5.01k stars 328 forks source link

Bug element's pointer-events is none #1013

Closed rgunindi closed 4 months ago

rgunindi commented 4 months ago

This is work:

page.Eval(`document.querySelector('.g0 a').click()`)

This doesn't work:

els, _ := page.Elements(".g0 a")
els[0].MustClick() //=> panic: element's pointer-events is none
// OR
el, _ := page.Element(".g0 a")
el.MustClick()

why this is happened in rod but work in js ?

Rod Version: v0.114.7

github-actions[bot] commented 4 months ago

Please add a valid Rod Version: v0.0.0 to your issue. Current version is v0.114.7

Please fix the format of your markdown:

3 MD031/blanks-around-fences Fenced code blocks should be surrounded by blank lines [Context: "```javascript"]

generated by check-issue

ysmood commented 4 months ago

pointer-events is none means not clickable, please google it first.

rgunindi commented 4 months ago

Why js code is work ?

ysmood commented 4 months ago

because js code does not control mouse, check the doc of Element.Click