-
I'm trying to test out the Audits events, but when I call: err := proto.AuditsEnable{}.Call(cdp)
if err != nil {
fmt.Println(err)
} I get the error:
So I checked the browser protocol version with proto.BrowserGetVersion{}.Call(cdp) which returned Is the issue with rod where I'm not setting the protocol version, or is the issue with chrome (I'm running vChrome/107.0.5300.0)? |
Beta Was this translation helpful? Give feedback.
Answered by
ysmood
Sep 27, 2022
Replies: 1 comment 2 replies
-
Works fine for me, I think only a page can use Audits: // Package main ...
package main
import (
"github.com/go-rod/rod"
"github.com/go-rod/rod/lib/proto"
)
func main() {
browser := rod.New().MustConnect()
page := browser.MustPage("http://example.com")
err := proto.AuditsEnable{}.Call(page)
if err != nil {
panic(err)
}
} |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
freb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Works fine for me, I think only a page can use Audits: