/// <summary>
 /// This closes a given window
 /// </summary>
 /// <param name="wind"></param>
 public static void CloseWindow(Window wind)
 {
     ThreadUtilities.RunOnUIThread(new Action(() =>
     {
         wind.Close();
     }));
 }
 /// <summary>
 /// This verifies that the given expected and actual are equal-- if they aren't it throws an Assert
 /// </summary>
 /// <param name="expected"></param>
 /// <param name="actual"></param>
 public static void RunAssert(object expected, object actual)
 {
     ThreadUtilities.RunOnUIThread(new Action(() =>
     {
         Assert.AreEqual(expected, actual);
     }));
 }
        public static void ClickOnItemNoWait(UIElement element)
        {
            Point middle = new Point();

            ThreadUtilities.RunOnUIThread(new Action(() => middle = GeneralUtilities.GetMiddleInScreenCoordinates(element)));
            MouseUtilities.LeftClickScreen((int)middle.X, (int)middle.Y);
        }
 /// <summary>
 /// Selects an item from a combobox
 /// </summary>
 /// <param name="window_combobox"></param>
 /// <param name="item"></param>
 public static void SelectComboboxItem(ComboBox window_combobox, string item)
 {
     ThreadUtilities.RunOnUIThread(new Action(() => window_combobox.Text = item));
     GeneralUtilities.WaitUntil(() => (bool)Application.Current.Dispatcher.Invoke(new Func <bool>(() => window_combobox.IsLoaded)));
 }