|
@@ -97,18 +97,6 @@ namespace WhiteTests
|
|
return application.GetWindow("Sketch Assistant");
|
|
return application.GetWindow("Sketch Assistant");
|
|
}
|
|
}
|
|
|
|
|
|
- public void printscreen()
|
|
|
|
- {
|
|
|
|
- Regex rx = new Regex(@"^(.*\\SketchAssistant\\)");
|
|
|
|
- Match match = rx.Match(TestContext.DeploymentDirectory);
|
|
|
|
- String SketchAssistDir = match.Groups[1].Value;
|
|
|
|
- Bitmap bitmap = new Bitmap(System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width,
|
|
|
|
- System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height);
|
|
|
|
- Graphics graphics = Graphics.FromImage(bitmap as System.Drawing.Image);
|
|
|
|
- graphics.CopyFromScreen(0, 0, 0, 0, bitmap.Size);
|
|
|
|
- bitmap.Save(SketchAssistDir + "screen" + ".jpg", ImageFormat.Jpeg);
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
[DataTestMethod]
|
|
[DataTestMethod]
|
|
[TestCategory("FileIO")]
|
|
[TestCategory("FileIO")]
|
|
[DataRow("line")]
|
|
[DataRow("line")]
|
|
@@ -122,10 +110,7 @@ namespace WhiteTests
|
|
mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("LoadMenuButton")).Click();
|
|
mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("LoadMenuButton")).Click();
|
|
Thread.Sleep(20);
|
|
Thread.Sleep(20);
|
|
mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("SVGMenuButton")).Click();
|
|
mainWindow.Get<Menu>(SearchCriteria.ByAutomationId("SVGMenuButton")).Click();
|
|
- Thread.Sleep(20);
|
|
|
|
- printscreen();
|
|
|
|
Thread.Sleep(1000);
|
|
Thread.Sleep(1000);
|
|
- printscreen();
|
|
|
|
inputSimulator.Keyboard.TextEntry(getSketchAssistantDirectory() + @"whitelisted\" + filename + ".svg");
|
|
inputSimulator.Keyboard.TextEntry(getSketchAssistantDirectory() + @"whitelisted\" + filename + ".svg");
|
|
Thread.Sleep(1000);
|
|
Thread.Sleep(1000);
|
|
inputSimulator.Keyboard.KeyPress(VirtualKeyCode.RETURN);
|
|
inputSimulator.Keyboard.KeyPress(VirtualKeyCode.RETURN);
|