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
},
使用这个方法却能够正常运行,有什么区别吗