Parameter restart not working in CodeceptJs with Playwright
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 32/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, node.js, playwright
- Domain
- testing
Research direction
The issue provides a Playwright helper configuration but names no source file or test. Start by reproducing the scenario with restart:false and keepBrowserState:true on the reported CodeceptJS, Node.js, and Playwright versions; done means explaining and correcting the repeated browser restarts, with regression coverage for the restart behavior.
Written by the indexing model from the issue text.
Description
What are you trying to achieve?
I am using CodeceptJS + Playwright
I'm looking for a before all solution to open browser e execute some steps before scenarios but can't find anyone in codeceptjs+playwright. BeforeSuite can't access browser.
What do you get instead?
I tried to use restart:false to run all scenarios in same browser window but the browser is always restarted before each scenario.
I could see something strange....when using restart:false and test finish, browser close and then another instance browser is opened but closes again and finally open another instance and continue the scenarios.
This not happen when restart:true, browser close and open ok between scenarios.
Provide test source code if related
Here is my helper with restart parameter:
helpers: {
Playwright: {
show: true,
browser: 'chromium',
windowSize: '1280x960',
waitForNavigation: "networkidle0",
restart: false,
keepBrowserState: true
},
},
Details
- CodeceptJS version: 3.1.1
- NodeJS Version: 14.9.0
- Operating System: Windows
- Playwright version: 1.14.0
- Configuration file:
const dotenv = require('dotenv').config();
exports.config = {
tests: './specs/site/*.js',
output: './reports/e2esitecc',
helpers: {
Playwright: {
show: true,
browser: 'chromium',
windowSize: '1280x960',
waitForNavigation: "networkidle0",
restart: false,
keepBrowserState: true
},
},
include: {
I: './steps_file.js',
testePage: './pages/testePage.js',
loginPage: './pages/login_po.js',
},
bootstrap: null,
mocha: {},
name: 'e2e-web-codeceptjs',
plugins: {
pauseOnFail: {},
retryFailedStep: {
enabled: true
},
tryTo: {
enabled: true
},
screenshotOnFail: {
enabled: true
}
}
}
- Dominant language
- JavaScript
- Stars
- 4.2k
- Forks
- 756
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from codeceptjs/CodeceptJS
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
codeceptjs/CodeceptJS#5420 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
codeceptjs/CodeceptJS#5358 · 1 comment ·
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
codeceptjs/CodeceptJS#4958 · 10 comments · 2 reactions ·
-
stale
Difficulty 1/5 Under an hour Newbie friendliness 72/100
codeceptjs/CodeceptJS#4778 · 3 comments ·
-
stale
Difficulty 4/5 3-5 days Newbie friendliness 38/100
codeceptjs/CodeceptJS#5618 · 1 comment ·
All issues in codeceptjs/CodeceptJS
Similar issues
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Automattic/safe-publish#594 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dream-num/dsh-univer-office#104 ·
-
comp/dashboard invalid P3
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
NousResearch/hermes-agent#121143 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
avniproject/avni-webapp#1811 ·
-
area/auroraboot area/webui bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100