Hi Vega,
Thanks for your response, but it's not exactly what I want to do.
My post isn't clear, so here is exactly the behavior I expect:
I've a lot of recordings, inside different tests cases. In each tests a popup can appear, and I catch it thanks to the PopupWatcher.
This PopupWatcher launch a function, and in this function I want to replay the test where this popup appeared.
It's because this random popup make the test fails, so I want to restart the current recording where it happen. The problem is that it can be any test, not only one so I think I couldn't apply your response.
Here is a view of my code:
void ITestModule.Run()
{
Mouse.DefaultMoveTime = 300;
Keyboard.DefaultKeyPressTime = 100;
Delay.SpeedFactor = 1.0;
PopupWatcher myPopupWatcher = new PopupWatcher();
myPopupWatcher.Watch("what_I_want_to_catch", ReplayTest);
myPopupWatcher.Start();
}
public static void ReplayTest(Ranorex.Core.RxPath myPath, Ranorex.Core.Element myElement)
{
//Here I want to restart the current recording without breaking the test workflow.
//The test where the popup appeared should be replace
}
Thanks again for your time,
I hope it will help you.
Regards,
Jeff