Cypress Best Practices | Dynamic Wait | Cypress

Sdílet
Vložit
  • čas přidán 21. 08. 2024
  • The goal of this video is to discuss best practices regarding the use of dynamic waits in comparison with static hard-coded waits. Moreover, I have shared project experience such as what kind of challenges you might face with static waits.
    This video is only intended to educate on the best practices.

Komentáře • 5

  • @nityaranjan6714
    @nityaranjan6714 Před 11 měsíci

    Have you tried the same code in headless mode. Its not working in headless

  • @saikrishnabanda6493
    @saikrishnabanda6493 Před rokem

    What does ** mean here in the code. Can you help me

    • @TestingInsights
      @TestingInsights  Před rokem

      In Cypress, ** is a wildcard character that can match any number of characters in a URL. Let's say you have this as intercept url '/users/**' , this means that any request with a URL that starts with /users/, regardless of what follows after it, will be intercepted.

  • @saikrishnabanda6493
    @saikrishnabanda6493 Před rokem

    What if we have query param as **/secure/?slug=abcde ?

    • @TestingInsights
      @TestingInsights  Před rokem

      Then you can use a wildcard for the URL and the query parameter separately like this:
      cy.intercept({
      method: 'GET',
      url: '**/secure/**',
      query: {
      slug: /abcde.*/
      }
      })