void RunTypingTest() { var openFile = filesToOpen.LastOrDefault(); if (openFile == null) { return; } // Open files. WorkbenchExtensions.OpenFiles(filesToOpen); // Wait for the text area to be available. var area = TestService.Session.WaitForElement(IdeQuery.TextAreaForFile(openFile), 30000); Assert.That(area, Has.Length.EqualTo(1)); UserInterfaceTests.Ide.WaitForIdeIdle(); // Go to the start of the document. TextEditor.MoveCaretToDocumentStart(); UserInterfaceTests.Ide.WaitForIdeIdle(); if (!TextToEnter.Any()) { return; } // Make some changes to the active file and then remove the changes. TextEditor.EnterText(TextToEnter); UserInterfaceTests.Ide.WaitForIdeIdle(); WorkbenchExtensions.SaveFile(); UserInterfaceTests.Ide.WaitForIdeIdle(); TextEditor.DeleteToLineStart(); UserInterfaceTests.Ide.WaitForIdeIdle(); WorkbenchExtensions.SaveFile(); UserInterfaceTests.Ide.WaitForIdeIdle(); }
public bool Done() { return(Session.ClickElement(c => IdeQuery.NewFileDialog(c).Children().Button().Marked("okButton"))); }