Ask a Question

Supress Log Messages or Catch failures

dsolis2
Occasional Contributor

Supress Log Messages or Catch failures

I am running the following routine to close all open browsers at the beginning of my tests. The function performs as expected, but when the loop no longer encounters a browser, it writes an error to the log: "Process not found"



The problem is that the error causes the entire report to show there was an error in the test. How do I supress the routine from writing it to the log so that the rest of my tests show as green if they pass? 



Function fCloseAllBrowser()

Do While Sys.Process("iexplore").Exists

    Sys.Process("iexplore").Close 'Kill the process 

   Loop

End Function



1 REPLY 1


Hi,





As far as I can see, your question was answered here. For additional information, refer to the 'WaitProcess Method' help topic.
--
Dmitry Nikolaev

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
cancel
Showing results for 
Search instead for 
Did you mean: