How to stop robot from invoking the next xaml file when a condition fails?

I am doing some regression testing with a terminal session. I have 10 xaml files I have invoked on the Main screen. In each file, I use Set Field At Position activity, the Send Control Key activity, and the Get Text Activity. Once the robot moves to where it is suppose to go, it searches for specific text on that screen. I have a condition set that if the text is found its True and the robot can move to the next Set Field At Position Activity and continue on. If its false it stops, takes a screen shot and then emails it. While the robot does indeed stop on the false side, it then continues to move to the next xaml file. So lets say the condition in xaml file 5 was false and it stopped, how to I get it to not move on to the next invoked xaml file 6? Its moving on and then of course it fails again because its not in the right terminal spot and the global handler catches that error exception and then stops again. I only care because the screen shot is confusing to the people reviewing the failure. They thinks the failure was on file 6 with the error exception when really its from file 5 condition failure not finding the correct text.

Hi @april.simon

  1. Create a variable in Main sequence (XamlStatus, DataType-Boolean, Intially assigned as True) .
  2. Create an argument (out_XamlStatus) in each individual xaml file with direction as out
  3. If any of the xaml encounter any issue or exception, in the catch section assign the argument (out_XamlStatus) as False
  4. This argument should be mapped with the XamlStatus variable of the main sequence
  5. So, in case if the xaml file is failing, in the catch section the out_XamlStatus value will become False.
  6. Before invoking any xaml just check the XamlStatus, if it is True, then only invoke xaml will process.

Try it.