public void RunAndWaitForTimer(Action action, string counterName, int timeout = 20000) { AutoTestSession.TimerCounterContext context = session.CreateNewTimerContext(counterName); action(); session.WaitForTimerContext(context, timeout); }