Hi,
I'm not quite sure if there is a way to achieve what you want? At first, popupwatcher is running in a second thread and does not allow to stop or modify things in the main test thread. It was discussed many times in the past. However, thanks to Ranorex Test Automation Helpers, it's now possible to pause the execution of test (from popupwatcher thread) and do some things, while the test is paused! This can be achieved with new popupwatcher method called
PauseWhileExists (available in Test Automation Helpers). Once called, Ranorex tries to pause the test at nearest possible action. In other words, it may not pause right after the popup window appearance! It may take just one or more test steps, before the test is paused
I'm still not sure if it's possible to "fail" the actually paused test and start the next one? I would suggest to set the error behavior of each testcase to "Continue with Sibling/Parent" (depending of your test suite structure). Then pause the test from popup watcher and try to fail it by throwing a new Ranorex exception. In a theory, after closing the popup element (which paused the test) the test should resume, terminate the existing (pause) test case and continuing with next one? But it's just a theory
I'm pretty sure that there is no (official) programming way to start the particular test case from code. But even if there would be such option, I would not recommend it at all
Calling test cases or individual modules from code would create a mess.