public void WinformsControlsTest_InnerForms_OpenAndClose(MainFormControlsTabOrder tabOrder)
        {
            Process process = TestHelpers.StartProcess(_exePath);

            TestHelpers.SendTabKeysToProcess(process, tabOrder);
            TestHelpers.SendEnterKeyToProcess(process);
            Assert.False(process.HasExited);

            process.Kill();
            process.WaitForExit();

            Assert.True(process.HasExited);
        }
Exemple #2
0
 /// <summary>
 ///  Presses Tab any number of times on the given process if it can be made the foreground process
 /// </summary>
 /// <param name="process">The process to send the Tab key(s) to</param>
 /// <param name="times">The number of times to press tab in a row</param>
 /// <remarks>Throws an ArgumentException if number of times is zero; this is unlikely to be intended.</remarks>
 /// <returns>Whether or not the Tab key(s) were pressed on the process</returns>
 /// <seealso cref="SendKeysToProcess(Process, string, bool)"/>
 public static bool SendTabKeysToProcess(Process process, MainFormControlsTabOrder times, bool switchToMainWindow = true)
 {
     return(SendTabKeysToProcess(process, (int)times, switchToMainWindow));
 }
Exemple #3
0
 /// <summary>
 ///  Presses Tab any number of times on the given process if it can be made the foreground process
 /// </summary>
 /// <param name="process">The process to send the Tab key(s) to</param>
 /// <param name="times">The number of times to press tab in a row</param>
 /// <remarks>Throws an ArgumentException if number of times is zero; this is unlikely to be intended.</remarks>
 /// <returns>Whether or not the Tab key(s) were pressed on the process</returns>
 /// <seealso cref="PressOnProcess(Process, string)"/>
 public static bool PressTabsOnProcess(Process process, MainFormControlsTabOrder times)
 {
     return(PressTabsOnProcess(process, (int)times));
 }