electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

Unable to specify remote-debugging-port via Spectron #311

Open buaban opened 6 years ago

buaban commented 6 years ago

Remote-debugging-port of Electron is always random when launch the Electron app via Spectron.

I wish to use Chrome lighthouse CLI to work with Spectron. Chrome lighthouse can access Electron via remote debugging port. I want to start the application by Spectron, and then use lighthouse to measure performance of some components. However, I cannot specify the remote debugging port for Electron. It looks like the port is random.

Here is my code:

this.app = new Application({
            path: this.appPath,
            args: '--remote-debugging-port=11210',
            requireName: 'electronRequire',
            chromeDriverLogPath: this.options.ChromeDriverLogPath,
            startTimeout: this.options.StartTimeout,
            quitTimeout: this.options.QuitTimeout,
            waitTimeout: this.options.WaitTimeout
        });
lizzie commented 6 years ago

the same issue