Forum Discussion

Urmikhan's avatar
Urmikhan
Occasional Contributor
6 years ago

how to handle uncertain message in application

Hi,

I have 14 testcases and using test execute for running test cases.My appliction if one testcase failed and showing message (Attached this meseage) and if I am not Click leave on message then all of them failed .But I donot Know when this message coming .If comes how I handle and what is the code for it .So my other test cases would be passed.

Thanks

 

  • Best practice would be to have all of your test cases be able to be executed 100% stand alone. Then use event handlers to make sure your tests always start and end on a specific part of the application (usually homepage, or login screen). If the test stops and is not on that screen, completely restart your application. 

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    It's a similar message to when I'm on this website here and type into a edit field end then navigate away.  So, what seems to be happening is that, in your automation, you're attempting to leave the page before you've saved whatever changes.  It COULD be a timing issue... you may have clicked save on the page and then attempted to navigate away before the save completes.  What you need to do is make sure that you add some sort of Wait methodology to your automation to wait until all updating is completed before you navigate to the next page.

  • cunderw's avatar
    cunderw
    Community Hero

    Best practice would be to have all of your test cases be able to be executed 100% stand alone. Then use event handlers to make sure your tests always start and end on a specific part of the application (usually homepage, or login screen). If the test stops and is not on that screen, completely restart your application.