Skip to content

Commit

Permalink
Fix PR remarks
Browse files Browse the repository at this point in the history
  • Loading branch information
papauorg committed Nov 15, 2024
1 parent 6e4eeee commit f779ac1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/winappdriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit f779ac1

Please sign in to comment.