SymphonyElectron/tests/spectron/spectronUtils.js

19 lines
442 B
JavaScript
Raw Normal View History

2018-08-01 09:50:48 -05:00
const childProcess = require('child_process');
class Utils {
static async openAppInMaximize(appPath) {
await childProcess.exec('start /MAX ' + appPath);
}
static async killProcess(processName) {
await childProcess.exec('taskkill /f /t /im ' + processName);
}
static async sleep(ms) {
return new Promise(resolve => {
setTimeout(resolve, ms)
})
}
}
module.exports = Utils;