Closed
Description
@kobenguyent , the solution doesn't work. When the plugin `tryTo` is enabled for a project, the plugin `retryFailedStep` doesn't work at all.
Tested with CodeceptJS 3.5.10.
config:
export const config: CodeceptJS.MainConfig = {
tests: "./*_test.ts",
output: "./output",
helpers: {
Playwright: {
browser: "chromium",
url: "http://localhost",
show: true,
},
},
name: "my",
plugins: {
tryTo: {
enabled: true,
},
retryFailedStep: {
enabled: true,
},
},
};
test:
Feature("My");
Scenario("test something", ({ I }) => {
I.amOnPage("https://www.google.com");
I.click("my_locator");
});
output in verbose mode shows that the plugin retryFailedStep
doesn't do any attempt 🐛
My --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test something
I am on page "https://www.google.com"
› [Browser:Info] Autofocus processing was blocked because a document already has a focused element.
› [Browser:Error] Permissions policy violation: unload is not allowed in this document.
I click "my_locator"
[1] Error (Non-Terminated) | Error: Clickable element "my_locator" was not found by text|CSS|XPath | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: Clickable element "my_locator" was not found by text|CSS|XPath 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 1187ms
If you disable or remove the tryTo
plugin from the config, it works well (the plugin retryFailedStep
will start working ✔️ )
output in verbose mode:
My --
[1] Starting recording promises
Timeouts:
› [Session] Starting singleton browser session
test something
I am on page "https://www.google.com"
› [Browser:Info] Autofocus processing was blocked because a document already has a focused element.
› [Browser:Error] Permissions policy violation: unload is not allowed in this document.
I click "my_locator"
[1] Retrying... Attempt #2
[1] Retrying... Attempt #3
[1] Retrying... Attempt #4
[1] Error (Non-Terminated) | Error: Clickable element "my_locator" was not found by text|CSS|XPath | (err) => { step.status = 'failed'; step.endTime = ...
[1] Error | Error: Clickable element "my_locator" was not found by text|CSS|XPath 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 2641ms
Originally posted by @mirao in #4022 (comment)
Metadata
Metadata
Assignees
Labels
No labels