From f779ac1059df98c579ac1afd411345b9c1b4d311 Mon Sep 17 00:00:00 2001 From: "Grathwohl, Philipp" Date: Fri, 15 Nov 2024 10:29:09 +0100 Subject: [PATCH] Fix PR remarks --- lib/winappdriver.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/winappdriver.js b/lib/winappdriver.js index 59db3ca..0fa755f 100644 --- a/lib/winappdriver.js +++ b/lib/winappdriver.js @@ -43,7 +43,7 @@ class WADProcess { this.port = opts.port; this.executablePath = opts.executablePath; this.proc = null; - this.forcequit = opts.forcequit; + this.isForceQuitEnabled = opts.isForceQuitEnabled; } get isRunning () { @@ -71,8 +71,9 @@ class WADProcess { const args = [`${this.port}${this.base}`]; - if (this.forcequit) + if (this.isForceQuitEnabled) { args.push('/forcequit'); + } this.proc = new SubProcess(this.executablePath, args, { encoding: 'ucs2' @@ -125,14 +126,14 @@ class WinAppDriver { async start (caps) { const executablePath = await getWADExecutablePath(); - const forcequit = caps["ms:forcequit"] === true; + const isForceQuitEnabled = caps['ms:forcequit'] === true; this.process = new WADProcess(this.log, { // XXXYD TODO: would be better if WinAppDriver didn't require passing in /wd/hub as a param base: DEFAULT_BASE_PATH, port: this.proxyPort, - executablePath: executablePath, - forcequit: forcequit + executablePath, + isForceQuitEnabled }); await this.process.start();