Skip to content

RetryFailedStep doesn't work with Retry, that was add in 3.4.1 #3600

Closed

Description

@hatufacci

Playwright use auto-waiting before start actions with elements https://playwright.dev/docs/actionability

It seems that this auto-waiting doesn't work in CodeceptJS version: 3.4.1

  • CodeceptJS version: 3.4.1
  • NodeJS Version: v18.14.0
  • Operating System: Ubuntu 20.04.5 LTS
  • Playwright
  • Configuration file:
helpers: {
    Playwright: {
      url: process.env.FUNCTIONS_APP_URL,
      show: false,
      restart: true,
      video: true,
      trace: true,
      browser: "chromium",
      windowSize: "1440x900",
      waitForNavigation: "networkidle",
      waitForTimeout: 40000,
      timeout: 10000,
    },
}

Activity

  1. hatufacci commented on Feb 21, 2023

    @hatufacci
    ContributorAuthor

    there is no problem with "codeceptjs": "3.3.7",

  2. Nikoms commented on Feb 22, 2023

    @Nikoms

    Which playwright version are you using? I had the same problem than you with 3.4.1 and playwright:1.13 so I rolled back

  3. hatufacci commented on Feb 22, 2023

    @hatufacci
    ContributorAuthor

    i don't think it depends on playwright version "playwright": "1.30.0",

  4. Nikoms commented on Feb 22, 2023

    @Nikoms

    Me neither, but it's always good to know :)

  5. hatufacci commented on Feb 22, 2023

    @hatufacci
    ContributorAuthor

    @Nikoms do you use retryFailedStep plugin? :) i guess it's reason))))

  6. hatufacci commented on Feb 22, 2023

    @hatufacci
    ContributorAuthor

    the reason is that retryFailedStep not works properly in 3.4.1
    Screenshot 2023-02-22 at 12 38 45
    Screenshot 2023-02-22 at 12 39 23
    than retryFailedStep must work!!!! and we go to
    Screenshot 2023-02-22 at 12 59 45
    but in 3.4.1 we throw new ElementNotFound(locator, prefix, suffix); and that's it

  7. hatufacci commented on Feb 22, 2023

    @hatufacci
    ContributorAuthor

    After we throw new ElementNotFound we should go to ElementNotFound class
    Screenshot 2023-02-22 at 14 52 15

    and after that error should be catch by
    return Promise.race([promise, Promise.resolve(res).then(fn)]).finally(() => clearTimeout(timer)).catch((err) => { for (const retryObj of retryRules) { if (!retryObj.when) return retry(err); if (retryObj.when && retryObj.when(err)) return retry(err); } throw err;

    but it doesn't
    Screenshot 2023-02-22 at 14 51 28

  8. Nikoms commented on Feb 22, 2023

    @Nikoms

    Yes, we use the retryFailedStep, good catch 🚀

  9. added a commit that references this issue on Mar 14, 2023
  10. StanislavGrishaev commented on Mar 30, 2023

    @StanislavGrishaev

    same issue here, rollback to version 3.3.7 helped

  11. changed the title [-]Playwright doesn't wait automatically for element to be clickable, visible, etc.,[/-] [+]RetryFailedStep doesn't work with 3.4.1[/+] on Jun 8, 2023
  12. hatufacci commented on Jul 13, 2023

    @hatufacci
    ContributorAuthor

    It still the issue in 3.5.2 version :( @DavertMik could you please take a look on it?
    3.3.7
    Screenshot 2023-07-14 at 13 54 48
    3.5.2
    Screenshot 2023-07-14 at 13 48 51

  13. hatufacci commented on Jul 14, 2023

    @hatufacci
    ContributorAuthor

    @Nikoms @StasGrishaevTutu could you please check your config file ? do you have allure: { } plugin in it ?

  14. StanislavGrishaev commented on Jul 14, 2023

    @StanislavGrishaev

    @Nikoms @StasGrishaevTutu could you please check your config file ? do you have allure: { } plugin in it ?

    hi there, in fact, I migrated from CodeceptJS to pure Playwright, so I can’t tell you anymore, unfortunately, sorry :)

  15. Nikoms commented on Jul 14, 2023

    @Nikoms

    Same here, sorry...

  16. hatufacci commented on Jul 17, 2023

    @hatufacci
    ContributorAuthor

    @DavertMik ok i reproduced the issue:
    the issue is reproducible when use
    retry: { BeforeSuite: 3, Before: 3, After: 3, AfterSuite: 3, },
    and
    retryFailedStep: { retries: 3, defaultIgnoredSteps: [ 'amOnPage', 'wait*', 'send*', 'execute*', 'run*', 'have*' ], factor: 1.5, ignoredSteps: [ 'amOnPage', 'wait*', 'send*', 'execute*', 'run*', 'have*' ], enabled: true, },

    if use Before() - you could reproduce the issue.

  17. changed the title [-]RetryFailedStep doesn't work with 3.4.1[/-] [+]RetryFailedStep doesn't work with Retry, that was add in 3.4.1[/+] on Jul 17, 2023
  18. DavertMik commented on Jul 19, 2023

    @DavertMik
    Contributor

    Thank you for reporting this issue and thanks to @kobenguyent for the quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions