-
Rod Version: v0.99.0 The code to demonstrate your questionbrowser := rod.New()
launcher := launcher.New().Bin(execPath + "\\bin\\electronapp\\App.exe") What have you tried to solve the questionI have seen it being done in some other libs, but I would like to know if it's possible on Rod, it's good to know because the motivation of it being supported is quite nice.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
According to here: https://www.electronjs.org/docs/api/command-line-switches#--remote-debugging-portport const { app } = require('electron')
app.commandLine.appendSwitch('remote-debugging-port', '8315')
app.whenReady().then(() => {
// Your code here
}) Use rod to connect to the port: u := launcher.MustResolveURL("8315")
browser := rod.New().ControlURL(u).MustConnect() For more info: https://github.com/go-rod/rod/blob/master/lib/examples/connect-browser/main.go |
Beta Was this translation helpful? Give feedback.
According to here: https://www.electronjs.org/docs/api/command-line-switches#--remote-debugging-portport
Use rod to connect to the port:
For more info: https://github.com/go-rod/rod/blob/master/lib/examples/connect-browser/main.go