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(); }
private void MainForm_FormClosed(object sender, FormClosedEventArgs e) { ScreenStateThread.Stop(); FeatureDetectionThread.Stop(); Application.Exit(); }