codeceptjs / codeceptjs/CodeceptJS

Puppeteer: using restart: false during tests will let browser stuck

Open
#2,950 2 comments 0 reactions 0 assignees View on GitHub
bug puppeteer
Dominant language
JavaScript
Stars
4.2k
Forks
757
Avg merge
2d 9h
Merged PRs (30d)
16

Description

Hi.
I'm trying to use persistent browser state with Puppeteer so multiple scenarios can be run without browser restarts between them. Since all other tests are arranged with the default restart config, I'm trying to use the dynamic `.config('restart: false')` in one single suite, like so:
```
Feature('My grouped tests in one feature').config({ restart: false });
// hooks and scenarios
```

Tests themselves behave exactly as intended. The problem is, after the last test finishes and passes, the browser will remain open, stuck, preventing the test queue to continue.

Since I'm running tests on a pipeline, this is preventing me to use this feature.

I noticed this have been reported before for WebDriverIO.

Is there any workaround for this?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.