Skip to content

Commit 1a6b88f

Browse files
NivedhaSenthilzabil
andcommitted
use process.platform to get os details
Signed-off-by: NivedhaSenthil <nivedhasenthil@gmail.com> Co-Authored-By: Zabil Cheriya Maliackal <zabil@users.noreply.github.com>
1 parent a21c32d commit 1a6b88f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/taiko.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ const {
3838
setClickOptions,
3939
} = require('./config');
4040
const fs = require('fs-extra');
41-
const os = require('os');
4241
const path = require('path');
4342
const childProcess = require('child_process');
4443
const crypto = require('crypto');
@@ -308,7 +307,7 @@ const _closeBrowser = async () => {
308307
await _client.removeAllListeners();
309308
pageHandler.addJavascriptDialogOpeningListener();
310309
//TODO: Remove check once fixed https://bugs.chromium.org/p/chromium/issues/detail?id=1147809
311-
if (!defaultConfig.firefox && !(os.type().includes('Windows') && defaultConfig.headful)) {
310+
if (!defaultConfig.firefox && !(process.platform == 'win32' && defaultConfig.headful)) {
312311
await page.close();
313312

314313
await new Promise((resolve) => {

0 commit comments

Comments
 (0)