Skip to content

Commit 2b14fe8

Browse files
committed
Revert "Session not being disposed for web tests"
This reverts commit 0d4630d.
1 parent ca47501 commit 2b14fe8

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/ox_modules/module-web.js

+9-5
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,16 @@ export default class WebModule extends WebDriverModule {
383383
}
384384

385385
async closeBrowserWindows(status) {
386-
try {
387-
await this.deleteSession();
388-
} catch (e) {
389-
this.logger.warn('Failed to close browser windows:', e);
386+
if (status && 'FAILED' === status.toUpperCase() && this.options && this.options.seleniumPid) {
387+
this.disposeContinue(status);
388+
} else {
389+
try {
390+
await this.deleteSession();
391+
} catch (e) {
392+
this.logger.warn('Failed to close browser windows:', e);
393+
}
394+
this.disposeContinue();
390395
}
391-
this.disposeContinue();
392396
}
393397

394398
disposeContinue(status) {

0 commit comments

Comments
 (0)