Forum Discussion

mdiandrea's avatar
mdiandrea
Occasional Contributor
4 months ago

Pop Ups

Hello,

I am having issues with a pop up with my keyword tests. Business just added a pop up that the user has to accept upon initial login. Once accepted, that pop up goes away and should not be seen again. This works when recording the tests, however in playback, the same pop up shows when navigating to a new page but shows randomly and is not consistent. I have tried adding the step to accept, which works when it appears, but if it doesn't it fails. Any help would be greatly appreciated.

  • Update: I added a 2nd delay and it seems to satisfy the pop up validation. Added the first one after the intial login which generates the pop up and then the second one after the user clicks the accept terms button. Thank you all for your help! It is much appreciated !1

  • "Once accepted, that pop up goes away and should not be seen again."

    Rather than teaching TestComplete to ignore this, it sounds to me like you should be reporting a bug on the pop-up. Try stepping through your test one line at a time and see if you can trigger the pop-up where you don't expect it.

    • mdiandrea's avatar
      mdiandrea
      Occasional Contributor

      Once clicked to accept, it sends an api to our backend to verify the user accepted. So it appears test complete is not getting the validation from the backend. This only happens when replaying the tests. 

      • Marsha_R's avatar
        Marsha_R
        Moderator

        TC is probably moving too fast to get the validation from the backend. You can step through it and try to figure out where the extra pop-up is happening, then put a delay before that step to see if that fixes it. Once you've found the right spot, then best practice is to use a Wait function rather than a delay to accommodate the timing. 

  • mdiandrea's avatar
    mdiandrea
    Occasional Contributor

    Update: I added a 2nd delay and it seems to satisfy the pop up validation. Added the first one after the intial login which generates the pop up and then the second one after the user clicks the accept terms button. Thank you all for your help! It is much appreciated !1