systelab-components-wdio-test
Version:
Widgets to be use in the E2E Tests based in WDIO
20 lines (19 loc) • 544 B
JavaScript
import os from "os";
import path from "path";
import { spawn } from "child_process";
export class TauriDriverUtility {
static start() {
if (!this.tauriDriver) {
this.tauriDriver = spawn(path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'), [], {
stdio: [null, process.stdout, process.stderr],
cwd: 'bin/'
});
}
}
static stop() {
if (this.tauriDriver) {
this.tauriDriver.kill();
this.tauriDriver = null;
}
}
}