private void RunScriptIfNotEmpty(IRunner scriptRunner, LightScript script) { if (script.Commands.Count() > 0) { RunnerFactory.PassDependencies(TestData); scriptRunner.Run(script); } }
public void StartScript(LightScript lightScript) { InitializeNewRun(); TestData.TestFixture = lightScript; RunnerFactory.PassDependencies(TestData); new Thread(delegate() { Task.Delay(150).Wait(); // make sure first screenshot is taken before starting running commands var runner = RunnerFactory.GetFor(lightScript.GetType()); runner.Run(lightScript); ScreenStateThread.Stop(); FeatureDetectionThread.Stop(); TestRunEnd?.Invoke(); }).Start(); }