At times, we might want to perform an additional action before recovering from an error like this; for this, we have onErrorRecover. It schedules a recovery sequence to run on the next loop. In order to show this on playground, we need to write this on a global scope, that is, not enclose it in the example (for) method call, and we will also need to import playground support and set needsIndefiniteExecution to true. This will give schedule recovery time to execute. We will write something like this:
print("... Example for: Driver onErrorRecover.....")import PlaygroundSupportPlaygroundPage.current.needsIndefiniteExecution = true
We will now duplicate the code from within the first example again, and this time, we will use