title: How to fail a test with conditions in Robot Framework
body: <p>I have trouble writing if conditions in Robot Framework.
  I need to Know if a process is failed\succeeded\still in progress. 
  I have a loop with timeout that waits until the process is failed\succeed(done)   </p>
  
  <p>I not sure how to :
  - brake from a case and fail test - only if the process failed.<br>
  - brake from a case and pass test - only if the process "succeed"\done.   </p>
  
  <p>here is the python code:</p>
  
  <pre><code>   for i in range(timeout):
         if wait_for_failed_proccess is True:
            result = False
            break 
         if wait_for_success_process is True:
            result = True
            break 
         time.sleep(1000)
     return result
  </code></pre>
  
  <p>robot framework code:</p>
  
  <pre><code>${result} =    Test process waiter
  Run keyword if| ${result}==False---&gt; need to fail test. the process has failed  
  Run keyword if| ${result}==True---&gt; test passed. continue to the next test 
  
  Test process waiter
   [documentation]          wait until process is done
   [timeout]                25 min 
  
   For      ${index}     IN RANGE     [TIMEOUT]
    run keyword if|Validate failed process==Ture|${result}=False|Exist From loop 
    run keyword if|Validate success process==Ture|${result}=True|Exist From loop
    Sleep      10
   END
   [return] result 
  
  
  Validate failed process
   [documentation]        confirmed process failed 
   Element should contain     ${message}     Failed 
  
  Validate success process 
  [documentation]        confirmed process is done 
  Element should contain     ${message}     Completed successfully
  </code></pre>