How To Handle Multiple Tabs And Windows In Cypress | Cypress Tutorial

Поділитися
Вставка
  • Опубліковано 1 лис 2024

КОМЕНТАРІ • 38

  • @zaidshaaban.
    @zaidshaaban. 7 місяців тому +1

    Thanks , very helpful

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  6 місяців тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @akalyaannadurai4142
    @akalyaannadurai4142 8 місяців тому +1

    Thanks lot for putting this video it's really helped me a lotttt❤

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  8 місяців тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @paramchaudhary2078
    @paramchaudhary2078 Рік тому +1

    It's really helpful to handle multiple tabs and windows in Cypress. Thanks! 👍

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @MithunajhaS
    @MithunajhaS 8 місяців тому +1

    I need the same kind of functionality in login process. After entering email, an window pops up with dynamic url and they are listening on the window until the user completes the login process. I'm facing issue to track the popup. Please suggest me a solution ASAP.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  7 місяців тому +1

      What is the issue with tracking? Please provide details.
      Solutions provided in the video were not helpful?

  • @UCIUbaf3b8lN7Q5GA8qO
    @UCIUbaf3b8lN7Q5GA8qO Рік тому +1

    The god of QA, thanks dude, you are awesome.

    • @UCIUbaf3b8lN7Q5GA8qO
      @UCIUbaf3b8lN7Q5GA8qO Рік тому +1

      One thing is that when doing the second method with removing attr, when navigating to link (in the same tab), I can't do any interactions, the expected title is empty, I can't click I can't do anything.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +2

      @@UCIUbaf3b8lN7Q5GA8qO You can send your code file at letskodeit@gmail.com, I will take a look.

    • @UCIUbaf3b8lN7Q5GA8qO
      @UCIUbaf3b8lN7Q5GA8qO Рік тому +1

      @@LetsKodeItOfficial I sent you, thanks for giving a hand!

  • @swasthikag3691
    @swasthikag3691 Рік тому +3

    Hi,
    How to handle the tabs and windows if there is no href or target attributes.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +2

      In that scenario, we need to use cy.window() and cy.stub() functions. I have an upcoming Cypress course, send an email at letskodeit@gmail.com if you are interested to enroll in that.

    • @EC_ISHWARYAS
      @EC_ISHWARYAS 5 місяців тому

      Yeah same problem for me too!

  • @Штаты-и5щ
    @Штаты-и5щ Рік тому +1

    Very useful video! Thanks brother!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @muhammadakif5951
    @muhammadakif5951 3 місяці тому +1

    Hey I need help. I am using Cypress. I have a button which when clicked opens up a new tab. But there is no target attribute nor there is any href attribute. So how can I handle that.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  3 місяці тому +1

      If there is a navigation to a new link then there would always be href, please check with your developers or if it is a public website you can share the details here.

  • @CodeInterviewGuru
    @CodeInterviewGuru Місяць тому +1

    Is it possible to get a popup on the same parent window when we have reacttokens in our URLs which can change randomly? Can you please clarify?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Місяць тому +1

      Are you seeing any issue?
      Can you please provide details?

    • @CodeInterviewGuru
      @CodeInterviewGuru Місяць тому +1

      @@LetsKodeItOfficial how to get elements from the another popup window? If we add selectors for those elements it is saying elements not found. Still it is searching elements in the main home page, how to make cypress to search elements in the second popup window page?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Місяць тому +1

      @@CodeInterviewGuru We need to first open the pop-up on the same page using one of the ways shows in the video, then finding the elements will look for elements in the window which is currently open.

  • @AdnanErlansyah-nx7xp
    @AdnanErlansyah-nx7xp 11 місяців тому +1

    How about when the button redirects to the new window or page and not at the same page again. how we can handle it, for example if we have the case the button or anchor has attribute target with the value of '_blank'

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  11 місяців тому +1

      This is what is recommended in this video, that we can update the behavior to redirect to the same page to handle tabs and windows.
      Cypress is not great with widows/tabs/s. If your application uses a lot of these then Cypress is not a good choice of tool for the application.

  • @robinr2336
    @robinr2336 Рік тому +1

    Great workaround. Thanks!

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @HanhNguyen-oi6tl
    @HanhNguyen-oi6tl Рік тому +2

    as I see, your video-only guide to handle multiple Tab and doesn't have handle multiple window in cypress, right?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Tab and Window are the same thing from a browser perspective.

    • @NehaParvin-ht7br
      @NehaParvin-ht7br 11 місяців тому +1

      ​@@LetsKodeItOfficialI'm getting a windows prompt as soon as I visit the URL. Can you please help me to handle this situation. The window is same as we used to get while accessing the Microsoft account. Firstly provide the username then hit the next button and then provide the password.

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  11 місяців тому +2

      @@NehaParvin-ht7br If your application involves a lot of new windows/tabs/s then Cypress is not an ideal framework. My suggestion would be to choose other automation frameworks.

  • @VikasKumar-uk9sk
    @VikasKumar-uk9sk Рік тому +1

    nice video

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Glad it helped you :)
      Please help spread the word by liking and sharing the video.

  • @Bell4Fun
    @Bell4Fun Рік тому +1

    Automation is nothing but pain. In ass work can be done in minutes is done by automation in days that too after investing fortune

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  Рік тому +1

      Looks like you didn't perform regression testing on multiple releases. Automation is very helpful in real world 👍

  • @NehaParvin-ht7br
    @NehaParvin-ht7br 11 місяців тому +2

    I have a scenario where a window prompts up as soon as I visit a URL. In new window I need to provide email then click on Next button and then it will ask for password. Can you please tell me how to handle this situation?

    • @LetsKodeItOfficial
      @LetsKodeItOfficial  11 місяців тому +1

      If your application involves a lot of new windows/tabs/s then Cypress is not an ideal framework. My suggestion would be to choose other automation frameworks.