In my automation, I have to “pause” to allow user to manually navigate to another screen. After that I continue with the automation. To implement this, I throw a signal that indicates that the expected screen is created and I wait for this signal for 2 minutes. As soon as the signal is thrown we continue with the automation. Otherwise, we generate an error.
But in certain scenarios the user might want to click on another button. In this case I do not want to wait for this signal any longer and obviously I do not want to generate an error.
How do I cancel the Wait for the Signal if a certain event happens? In similar situations I would use WaitAny, but it looks like WaitAny cannot be used here.
I also tried to Cancel the Activity (though it is not the preferable way to handle this scenario), but even that did not stop the Wait... Please help!
Multiple events can trigger the signal. When I have scenario like this, I would just have both events trigger the signal and also update some value in a global variable that you could read after the signal was triggered to determine which event released the signal.