Forum Discussion

Lagencie's avatar
Lagencie
Frequent Contributor
7 years ago

Testrun with Browser Loop - Individual Log

Is it possible to set an option or whatever, so the test wouldn't stop completely if an error occurs, but instead handles every browser loop as own test?

 

So if there are 4 browsers installed and you run the test with browser loop and an error occurs in iexplore it would still run the chrome,  firefox and edge browser and gives an output log where you see test: xyz - failed iexplore, positiv run chrome, firefox, edge

 

hope its clear what I mean.

 

best regards

Dominik

2 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    Go to Tools | Options | Current Project Properties | Playback.  There's an option there for "stop on error".  Uncheck that.  

     

    Also, in your project, on the Test Item itself, there's an option to specify whether or not you will stop on error and, if so, if you'll stop the individual item or the whole project.  I'd suggest setting it to "None".

     

    Then...  in your code within your loop, add try/except logic.  Additionally, add detection code within the loop for object detection so that, if an object fails to be properly recognized or some other error like it which doesn't raise an exception, you will force an exception to be raised.  This way, as you go through the loop, if a problem occurs with iexplore, you're exception logic will handle the exception, go to the "catch/finally" blocks, and then go back to the beginning of the loop.

    • Lagencie's avatar
      Lagencie
      Frequent Contributor

      This would sadly destroy the whole construct they offer with the product....

       

      If I have to manually script every test where I need this, rather than being integrated somehow.

       

      But the answer pretty much gives me the idea of it not working sadly ... or only if I touch all my idk 200+ tests and instead of the implemented browser loop I script every single test