That's actually pretty easy to do. All that you need to do is add a precondition to steps 7, 8 and 9 of type “Find/Assert Datagrid Row” and fill in the same values for Widget Name, Column (1) Name and Column (1) Value as you have in your current step 7. What will happen is that if the precondition is not met (i.e. ATS cannot find your widget/column/value combination), the step of which the precondition is part will be skipped, so your test case will not fail.
You can either do this as explained above, as you would want to skip clicking the row, the delete button and the confirmation button, OR (better option) you extract steps 7-9 into an extracted action, and add the precondition to that action only. Saves you some work and possible maintenance!
Please let me know if you get this working.
Joris van der Heijden
ATS Consultant @ Mansystems
This can be done using Preconditions. In your click step use a precodnition function “Find/Assert DataGrid Row”.
A step by step how to is available here – https://docs.mendix.com/ats/howtos/ht-version-2/use-precondition-in-test-cases-2
Hope this helps,