Repository navigation
Closed
Labels
Description
It's a regression in 3.6.0.
It works well with 3.5.15.
What are you trying to achieve?
You should see the Retrying... Attempt ... retries in the following test.
This is how it works with 3.5.15 ✔️
CodeceptJS v3.5.15 #StandWithUkraine
Using test root "/home/mirao/workspace/codeceptjs/tests/my"
Helpers: Playwright
Plugins: screenshotOnFail, retryFailedStep
My --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test something
I see element ".blabla"
[1] Retrying... Attempt #2
[1] Retrying... Attempt #3
[1] Retrying... Attempt #4
[1] Error (Non-Terminated) | Error: Element ".blabla" is not visible on page. | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: Element ".blabla" is not visible on page. undefined...
[1] <teardown> Stopping recording promises
› <screenshotOnFail> Test failed, try to save a screenshot
› Screenshot is saving to /home/mirao/workspace/codeceptjs/tests/my/output/test_something.failed.png
✖ FAILED in 1148ms
[2] Starting recording promises
-- FAILURES:
1) My
test something:
Element ".blabla" is not visible on page.
at dontSeeElementError (/home/mirao/workspace/codeceptjs/node_modules/.pnpm/codeceptjs@3.5.15_@babel+core@7.24.7_@babel+preset-env@7.24.7_react@18.2.0_typescript@4.8.2/node_modules/codeceptjs/lib/helper/errors/ElementAssertion.js:23:9)
at Playwright.seeElement (/home/mirao/workspace/codeceptjs/node_modules/.pnpm/codeceptjs@3.5.15_@babel+core@7.24.7_@babel+preset-env@7.24.7_react@18.2.0_typescript@4.8.2/node_modules/codeceptjs/lib/helper/Playwright.js:1460:7)
Scenario Steps:
- I.seeElement(".blabla") at Test.<anonymous> (./My_test.ts:4:7)
Artifacts:
- screenshot: /home/mirao/workspace/codeceptjs/tests/my/output/test_something.failed.png
FAIL | 0 passed, 1 failed // 2sWhat do you get instead?
Provide console output if related. Use
--verbosemode for more details.
This is how it works with 3.6.0 or 3.6.2 🐛
CodeceptJS v3.6.0 #StandWithUkraine
Using test root "/home/mirao/workspace/codeceptjs/tests/my"
Helpers: Playwright
Plugins: screenshotOnFail, retryFailedStep
My --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test something
I see element ".blabla"
[1] Error (Non-Terminated) | Error: Element ".blabla" is not visible on page. | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: Element ".blabla" is not visible on page. undefined...
[1] <teardown> Stopping recording promises
› <screenshotOnFail> Test failed, try to save a screenshot
› Screenshot is saving to /home/mirao/workspace/codeceptjs/tests/my/output/test_something.failed.png
✖ FAILED in 117ms
[2] Starting recording promises
-- FAILURES:
1) My
test something:
Element ".blabla" is not visible on page.
at dontSeeElementError (/home/mirao/workspace/codeceptjs/node_modules/.pnpm/codeceptjs@3.6.0_@babel+core@7.24.7_@babel+preset-env@7.24.7_react@18.2.0_typescript@4.8.2/node_modules/codeceptjs/lib/helper/errors/ElementAssertion.js:23:9)
at Playwright.seeElement (/home/mirao/workspace/codeceptjs/node_modules/.pnpm/codeceptjs@3.6.0_@babel+core@7.24.7_@babel+preset-env@7.24.7_react@18.2.0_typescript@4.8.2/node_modules/codeceptjs/lib/helper/Playwright.js:1464:7)
Scenario Steps:
- I.seeElement(".blabla") at Test.<anonymous> (./My_test.ts:4:7)
Artifacts:
- screenshot: /home/mirao/workspace/codeceptjs/tests/my/output/test_something.failed.png
FAIL | 0 passed, 1 failed // 574msProvide test source code if related
Feature("My");
Scenario("test something", ({ I }) => {
I.seeElement(".blabla");
});Details
- CodeceptJS version: 3.6.0 or 3.6.2
- NodeJS Version: 18.20
- Operating System: Ubuntu 22.04
- Playwright Version 1.43.1
- Configuration file:
export const config: CodeceptJS.MainConfig = {
tests: "./*_test.ts",
output: "./output",
helpers: {
Playwright: {
browser: "chromium",
url: "http://localhost",
show: true,
},
},
plugins: {
retryFailedStep: {
enabled: true,
},
},
name: "my",
};
Activity
mirao commentedon Jun 14, 2024
Interestingly it works well in a "shell" mode (tested with 3.6.3):
mirao commentedon Jun 14, 2024
Well, only
--debugor--verbosemode is affected.And if I comment out this line:
CodeceptJS/lib/command/run.js
Line 17 in e34471c
everything works well even in
--verbosemode.store.debugModeseems to be needed for healers only? #4230@DavertMik
[-]Plugin "retryFailedStep" doesn't work, searching for element fails immediately[/-][+]Plugin "retryFailedStep" doesn't work in --debug or --verbose mode, searching for element fails immediately[/+]DavertMik commentedon Jun 16, 2024
Thanks, I'm checking
mirao commentedon Jun 20, 2024
I "solved" it a different way to myself.
I patched the
retryFailedStepplugin - I removed this lineCodeceptJS/lib/plugin/retryFailedStep.js
Line 96 in ac75d94
It seems to me that the removing doesn't affect functionality of the plugin. I tested the plugin in non-verbose mode,
--verbosemode, inshellmode and forpause()github-actions commentedon Sep 19, 2024
This issue is stale because it has been open for 90 days with no activity.
javierfuentesm commentedon Mar 5, 2025
Are there any updates? @DavertMik 🫣 im facing the same issue
emiliangrecu commentedon Mar 6, 2025
I am also facing this problem.
fix: retryFailedStep plugin works in debug/verbose mode
fix: retryFailedStep plugin works in debug/verbose mode