Code: Select all
try
{
keepRunning:
// while window visible, keep doing the following
while (repo.FormAdd_Markets_to_Market_Da.ButtonDone.Visible)
{
repo.FormICE_Formula_Trader_Light.Container_userDataArea.EnsureVisible();
repo.FormICE_Formula_Trader_Light.Container_userDataArea.Click();
}
}
catch // window gone or Pause key has been pressed
{
if ("2:00 pm")
{
// do some things and then let program close
}
else
{
// re-open window with button and keep clicking
// ... code removed
goto keepRunning;
}
}
The only way I can think around this is to check if the Pause key was clicked in the catch, but how can I do this? Is it possible to programmatically determine if the Pause key was pressed within Ranorex?