diff options
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting')
| -rw-r--r-- | Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs index c56a177f8..7df8d59f9 100644 --- a/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs +++ b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs @@ -17,12 +17,17 @@ namespace Tango.UnitTesting [TestCategory("Machine Studio")] public class MachineStudio_TST { + private Window GetMachineStudioWindow() + { + var app = Application.AttachOrLaunch(new System.Diagnostics.ProcessStartInfo() { FileName = Helper.GetMachineStudioPath() }); + var window = app.GetWindow("Tango", InitializeOption.NoCache); + return window; + } + [TestMethod] public void Login() { - var app = Application.Launch(Helper.GetMachineStudioPath()); - - var window = app.GetWindow("Tango", InitializeOption.NoCache); + var window = GetMachineStudioWindow(); window.WaitTill(() => window.Get<Button>(SearchCriteria.ByText("LOGIN")) != null); @@ -31,16 +36,18 @@ namespace Tango.UnitTesting Thread.Sleep(1000); btnLogin.Click(); + } + + [TestMethod] + public void Start_Developer_Module() + { + var window = GetMachineStudioWindow(); window.WaitTill(() => window.Get<Button>(SearchCriteria.ByAutomationId("Developer")) != null); var btnDeveloper = window.Get<Button>(SearchCriteria.ByAutomationId("Developer")); btnDeveloper.Click(); - - Thread.Sleep(5000); - - app.Kill(); } } } |
