测试时遇到的问题,两个不同的启动程序的方法,如下

QMRun: function () {
        let platform = process.platform;
        let runOptions = {
             chromeDriverArgs: ["remote-debugging-port=9222"]
        };
        if (platform === 'darwin') {
            runOptions.chromeDriverLogPath = '.\/debug_log\/chromedriver.log';
             runOptions.webdriverLogPath = '.\/debug_log';
             runOptions.path = '/Applications/qmessages.app/Contents/MacOS/qmessages';
        } else if (platform === 'win32') {
             runOptions.chromeDriverLogPath = '.\\debug_log\\chromedriver.log';
             runOptions.webdriverLogPath = '.\\debug_log';
             runOptions.path = process.env.LOCALAPPDATA + `\\Programs\\qmessages\\qmessages.exe`;
         } else {
             throw (`不支持的操作系统 ${platform}`)
         }
       return new Application(runOptions);
    },

使用这个方法,程序无法运行

QMRun: function(){
        let app = new Application({
            path: qmPath
        });
        return app
    },

使用这个方法却能够正常运行,有什么区别吗

可以输出下第一个方法具体传递的参数值是什么:runOptions,再对比下第二个的区别