The ‘Exit’ action provides the option to cleanly exit a journey rather than having to complete all steps/actions in the script to completion. The action isn’t very useful by itself however when included within an IfAssert or IfElement will provide the option to avoid a failure to an intermittent expected scenario. This can be great for decrease the frequency of failures and alerts if you are unable to stop something from happening but are okay with the result.
Here is an example of the structure an ‘Exit’ may be used:
In this example you can see the journey waits for the page loads and then move to an IfAssert. This IfAssert checks if the ‘Add to Basket’ button is clickable, if it is clickable we proceed with a click. If this button is not clickable we then move to the ‘Else’ which captures the screen (for debugging purposes) and exits the journey which leads to a successful result.
If you decide to use this action within your journey we recommend checking it every now and again to make sure it is functioning correctly. If you are checking for a product to be in stock using the ‘Add to Basket’ as a signifier and the selector changes, this may cause the journey to be automatically directed to the Exit rather than click ‘Add to Basket’. As the journey is successful you will not receive an alert for this.