public bool SelectElement(Func <AppQuery, AppQuery> query) { AppResult[] results = Query(query); if (results.Length > 0) { return(session.Select(results [0])); } return(false); }
public override void Replay(AutoTestSession testSession) { AppQuery query = testSession.CreateNewQuery(); AppResult[] results = query.Window().Marked("MonoDevelop.Ide.Gui.DefaultWorkbench").Execute(); if (results.Length == 0) { return; } testSession.Select(results [0]); if (results [0] is AutoTest.Results.GtkWidgetResult) { AutoTest.Results.GtkWidgetResult widgetResult = (AutoTest.Results.GtkWidgetResult)results [0]; widgetResult.EnterText(Text); } }
public override void Replay(AutoTestSession testSession) { // Select the main window and then we can push key events to it. AppQuery query = testSession.CreateNewQuery(); AppResult[] results = query.Window().Marked("MonoDevelop.Ide.Gui.DefaultWorkbench").Execute(); if (results.Length == 0) { return; } testSession.Select(results[0]); // We need the GtkWidgetResult for the main window as we only have the keys as a Gdk key if (results [0] is AutoTest.Results.GtkWidgetResult) { AutoTest.Results.GtkWidgetResult widgetResult = (AutoTest.Results.GtkWidgetResult)results[0]; widgetResult.RealTypeKey(Key, Modifiers); } }
public override void Replay (AutoTestSession testSession) { AppQuery query = testSession.CreateNewQuery (); AppResult[] results = query.Window ().Marked ("MonoDevelop.Ide.Gui.DefaultWorkbench").Execute (); if (results.Length == 0) { return; } testSession.Select (results [0]); if (results [0] is AutoTest.Results.GtkWidgetResult) { AutoTest.Results.GtkWidgetResult widgetResult = (AutoTest.Results.GtkWidgetResult)results [0]; widgetResult.EnterText (Text); } }
public override void Replay (AutoTestSession testSession) { // Select the main window and then we can push key events to it. AppQuery query = testSession.CreateNewQuery (); AppResult[] results = query.Window ().Marked ("MonoDevelop.Ide.Gui.DefaultWorkbench").Execute (); if (results.Length == 0) { return; } testSession.Select (results[0]); // We need the GtkWidgetResult for the main window as we only have the keys as a Gdk key if (results [0] is AutoTest.Results.GtkWidgetResult) { AutoTest.Results.GtkWidgetResult widgetResult = (AutoTest.Results.GtkWidgetResult) results[0]; widgetResult.RealTypeKey (Key, Modifiers); } }