aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2018-04-18 14:02:16 +0300
committerRoy Ben-Shabat <Roy@Twine-s.com>2018-04-18 14:02:16 +0300
commit30dbc28131a53925dd8cb17f3ca3e84922f0cb3d (patch)
treeabca85e201dd9a90a824dd243d5bd32be12de4c8 /Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs
parent1356c4682507fe3c7bdfebc7316fcad1b67594a1 (diff)
downloadTango-30dbc28131a53925dd8cb17f3ca3e84922f0cb3d.tar.gz
Tango-30dbc28131a53925dd8cb17f3ca3e84922f0cb3d.zip
Started working on UI automation testing!
Diffstat (limited to 'Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs')
-rw-r--r--Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs46
1 files changed, 46 insertions, 0 deletions
diff --git a/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs
new file mode 100644
index 000000000..c56a177f8
--- /dev/null
+++ b/Software/Visual_Studio/Tango.UnitTesting/MachineStudio_TST.cs
@@ -0,0 +1,46 @@
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using TestStack.White;
+using TestStack.White.Factory;
+using TestStack.White.UIItems;
+using TestStack.White.UIItems.Finders;
+using TestStack.White.UIItems.WindowItems;
+
+namespace Tango.UnitTesting
+{
+ [TestClass]
+ [TestCategory("Machine Studio")]
+ public class MachineStudio_TST
+ {
+ [TestMethod]
+ public void Login()
+ {
+ var app = Application.Launch(Helper.GetMachineStudioPath());
+
+ var window = app.GetWindow("Tango", InitializeOption.NoCache);
+
+ window.WaitTill(() => window.Get<Button>(SearchCriteria.ByText("LOGIN")) != null);
+
+ var btnLogin = window.Get<Button>(SearchCriteria.ByText("LOGIN"));
+
+ Thread.Sleep(1000);
+
+ btnLogin.Click();
+
+ window.WaitTill(() => window.Get<Button>(SearchCriteria.ByAutomationId("Developer")) != null);
+
+ var btnDeveloper = window.Get<Button>(SearchCriteria.ByAutomationId("Developer"));
+
+ btnDeveloper.Click();
+
+ Thread.Sleep(5000);
+
+ app.Kill();
+ }
+ }
+}