当前位置: 首页>>代码示例>>C#>>正文


C# AutomationRunner.WaitForName方法代码示例

本文整理汇总了C#中MatterHackers.GuiAutomation.AutomationRunner.WaitForName方法的典型用法代码示例。如果您正苦于以下问题:C# AutomationRunner.WaitForName方法的具体用法?C# AutomationRunner.WaitForName怎么用?C# AutomationRunner.WaitForName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在MatterHackers.GuiAutomation.AutomationRunner的用法示例。


在下文中一共展示了AutomationRunner.WaitForName方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: ClickingConfigureNotificationSettingsButtonOpensWindow

		//DOES NOT WORK
		public void ClickingConfigureNotificationSettingsButtonOpensWindow()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{

					testRunner.ClickByName("SettingsAndControls", 5);
					testRunner.ClickByName("Options Tab", 6);

					bool printNotificationsWindowExists1 = testRunner.WaitForName("Notification Options Window", 3);
					resultsHarness.AddTestResult(printNotificationsWindowExists1 == false, "Print Notification Window does not exist");

					testRunner.ClickByName("Configure Notification Settings Button", 6);
					bool printNotificationsWindowExists2 = testRunner.WaitForName("Notification Options Window", 3);
					resultsHarness.AddTestResult(printNotificationsWindowExists2 == true, "Print Notifications Window exists after Configure button is clicked");

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun, "MC_Three_Queue_Items");

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:28,代码来源:OptionsTabTests.cs

示例2: SoftwareLevelingRequiredCorrectWorkflow

		public void SoftwareLevelingRequiredCorrectWorkflow()
		{
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);

					// make a jump start printer
					var emualtorProccess = MatterControlUtilities.LaunchAndConnectToPrinterEmulator(testRunner, false, "JumStart", "V1");

					// make sure it is showing the correct button
					resultsHarness.AddTestResult(!testRunner.WaitForName("Start Print Button", .5), "Start Print hidden");
					resultsHarness.AddTestResult(testRunner.WaitForName("Finish Setup Button", .5), "Finish Setup showing");

					// do print leveling
					testRunner.ClickByName("Next Button", .5);
					testRunner.ClickByName("Next Button", .5);
					testRunner.ClickByName("Next Button", .5);
					for (int i = 0; i < 3; i++)
					{
						testRunner.ClickByName("Move Z positive", .5);
						testRunner.ClickByName("Next Button", .5);
						testRunner.ClickByName("Next Button", .5);
						testRunner.ClickByName("Next Button", .5);
					}

					resultsHarness.AddTestResult(testRunner.ClickByName("Done Button", .5), "Found Done button");

					// make sure the button has changed to start print
					resultsHarness.AddTestResult(testRunner.WaitForName("Start Print Button", .5), "Start Print showing");
					resultsHarness.AddTestResult(!testRunner.WaitForName("Finish Setup Button", .5), "Finish Setup hidden");

					// reset to defaults and make sure print leveling is cleared
					MatterControlUtilities.SwitchToAdvancedSettings(testRunner, resultsHarness);

					resultsHarness.AddTestResult(testRunner.ClickByName("Slice Settings Options Menu", 1), "Click Options" );
					resultsHarness.AddTestResult(testRunner.ClickByName("Reset to defaults Menu Item", 1), "Select Reset to defaults");
					resultsHarness.AddTestResult(testRunner.ClickByName("Yes Button", .5), "Click yes to revert");
					testRunner.Wait(1);

					// make sure it is showing the correct button
					resultsHarness.AddTestResult(!testRunner.WaitForName("Start Print Button", .5), "Start Print hidden");
					resultsHarness.AddTestResult(testRunner.WaitForName("Finish Setup Button", .5), "Finish Setup showing");

					MatterControlUtilities.CloseMatterControl(testRunner);

					try
					{
						emualtorProccess.Kill();
					}
					catch { }
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed(12));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:59,代码来源:HardwareLevelingUITests.cs

示例3: ExportAsGcode

		public void ExportAsGcode()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{

					MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);

					string firstItemName = "Row Item Batman";
					//Navigate to Downloads Library Provider
					testRunner.ClickByName("Queue Tab");
					testRunner.ClickByName("Queue Add Button", 2);

					//Get parts to add
					string rowItemPath = MatterControlUtilities.GetTestItemPath("Batman.stl");

					//Add STL part items to Downloads and then type paths into file dialogue
					testRunner.Wait(1);
					testRunner.Type(MatterControlUtilities.GetTestItemPath("Batman.stl"));
					testRunner.Wait(1);
					testRunner.Type("{Enter}");

					//Get test results 
					resultsHarness.AddTestResult(testRunner.WaitForName(firstItemName, 2) == true);

					testRunner.ClickByName("Queue Edit Button");
					testRunner.ClickByName(firstItemName);
					testRunner.ClickByName("Queue Export Button");
					testRunner.Wait(2);

					testRunner.WaitForName("Export Item Window", 2);
					testRunner.ClickByName("Export as GCode Button", 2);
					testRunner.Wait(2);

					string gcodeExportPath = MatterControlUtilities.PathToExportGcodeFolder;
					testRunner.Type(gcodeExportPath);
					testRunner.Type("{Enter}");
					testRunner.Wait(2);

					Console.WriteLine(gcodeExportPath);

					resultsHarness.AddTestResult(File.Exists(gcodeExportPath) == true);
					Debugger.Break();

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2);

		}
开发者ID:broettge,项目名称:MatterControl,代码行数:56,代码来源:ExportItemWindowTests.cs

示例4: DownloadsAddButtonAddsMultipleFiles

		public void DownloadsAddButtonAddsMultipleFiles()
		{
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);
					MatterControlUtilities.CreateDownloadsSubFolder();

					//Navigate to Downloads Library Provider
					testRunner.ClickByName("Library Tab");
					MatterControlUtilities.NavigateToFolder(testRunner, "Downloads Row Item Collection");
					MatterControlUtilities.NavigateToFolder(testRunner, "-Temporary Row Item Collection");
					testRunner.ClickByName("Library Add Button");
					testRunner.Wait(3);

					testRunner.Wait(2);

					// Add both files to the FileOpen dialog
					testRunner.Type(
						string.Format(
							"\"{0}\" \"{1}\"",
							MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl"),
							MatterControlUtilities.GetTestItemPath("Batman.stl")));

					testRunner.Wait(1);
					testRunner.Type("{Enter}");

					resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Fennec Fox", 2), "Fennec Fox item exists");
					resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Batman", 2), "Batman item exists");
					testRunner.Wait(1);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = null;

			try
			{
				testHarness = MatterControlUtilities.RunTest(testToRun);

			}
			catch { }
			finally
			{
				MatterControlUtilities.DeleteDownloadsSubFolder();
			}

			Assert.IsTrue(testHarness.AllTestsPassed(2));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:51,代码来源:LibraryDownloadsTest.cs

示例5: LocalLibraryAddButtonAddsMultipleItemsToLibrary

		public void LocalLibraryAddButtonAddsMultipleItemsToLibrary()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);
					//Names of Items to be added
					string firstItemName = "Row Item " + "Fennec Fox";
					string secondItemName = "Row Item " + "Batman";

					//Navigate to Local Library 
					testRunner.ClickByName("Library Tab");
					MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");

					//Make sure both Items do not exist before the test begins
					bool firstItemExists = testRunner.WaitForName(firstItemName, 1);
					bool secondItemExists = testRunner.WaitForName(secondItemName, 1);
					resultsHarness.AddTestResult(firstItemExists == false);
					resultsHarness.AddTestResult(secondItemExists == false);

					//Click Local Library Add Button
					testRunner.ClickByName("Library Add Button");

					//Get Library Item to Add
					string firstRowItemPath = MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl");
					string secondRowItemPath = MatterControlUtilities.GetTestItemPath("Batman.stl");

					string textForBothRowItems = String.Format("\"{0}\" \"{1}\"", firstRowItemPath, secondRowItemPath);
					testRunner.Wait(2);
					testRunner.Type(textForBothRowItems);
					testRunner.Wait(1);
					testRunner.Type("{Enter}");


					bool firstRowItemWasAdded = testRunner.WaitForName(firstItemName, 2);
					bool secondRowItemWasAdded = testRunner.WaitForName(secondItemName, 2);
					resultsHarness.AddTestResult(firstRowItemWasAdded == true);
					resultsHarness.AddTestResult(secondRowItemWasAdded == true);


					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed(4));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:50,代码来源:LocalLibraryTests.cs

示例6: DownloadsAddButtonAddsMultipleFiles

		public void DownloadsAddButtonAddsMultipleFiles()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{

				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.CreateDownloadsSubFolder();

					//Navigate to Downloads Library Provider
					testRunner.ClickByName("Library Tab");
					MatterControlUtilities.NavigateToFolder(testRunner, "Downloads Row Item Collection");
					MatterControlUtilities.NavigateToFolder(testRunner, "Temporary Row Item Collection");
					testRunner.ClickByName("Library Add Button");
					testRunner.Wait(3);

					string firstRowItemPath = MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl");
					string secondRowItemPath = MatterControlUtilities.GetTestItemPath("Batman.stl");
					string textForBothRowItems = String.Format("\"{0}\" \"{1}\"", firstRowItemPath, secondRowItemPath);
					testRunner.Wait(2);
					testRunner.Type(textForBothRowItems);
					testRunner.Wait(1);
					testRunner.Type("{Enter}");

					resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Fennec Fox", 2) == true);
					resultsHarness.AddTestResult(testRunner.WaitForName("Row Item Batman", 2) == true);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = null;

			try
			{
				testHarness = MatterControlUtilities.RunTest(testToRun);

			}
			catch { }
			finally
			{
				MatterControlUtilities.CleanupDownloadsDirectory(MatterControlUtilities.PathToDownloadsSubFolder);
			}

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:48,代码来源:LibraryDownloadsTest.cs

示例7: ClickingShowTerminalButtonOpensTerminal

		public void ClickingShowTerminalButtonOpensTerminal()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					testRunner.ClickByName("SettingsAndControls", 5);
					testRunner.Wait(2);
					testRunner.ClickByName("Options Tab", 6);

					bool terminalWindowExists1 = testRunner.WaitForName("Gcode Terminal", 0);
					resultsHarness.AddTestResult(terminalWindowExists1 == false, "Terminal Window does not exist");

					testRunner.ClickByName("Show Terminal Button", 6);
					testRunner.Wait(1);

					SystemWindow containingWindow;
					GuiWidget terminalWindow = testRunner.GetWidgetByName("Gcode Terminal", out containingWindow, 3);
					resultsHarness.AddTestResult(terminalWindow != null, "Terminal Window exists after Show Terminal button is clicked");
					containingWindow.CloseOnIdle();
					testRunner.Wait(.5);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:32,代码来源:OptionsTabTests.cs

示例8: FileMenuAddPrinter

		public void FileMenuAddPrinter()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{

					testRunner.ClickByName("File Menu");
					testRunner.Wait(1);
					testRunner.ClickByName("Add Printer Menu Item");
					testRunner.Wait(1);
					resultsHarness.AddTestResult(testRunner.WaitForName("Printer Connection Window", 3));

					testRunner.ClickByName("Setup Connection Cancel Button");

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun, queueItemFolderToAdd: QueueTemplate.Three_Queue_Items);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 1); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:25,代码来源:FileMenuTest.cs

示例9: AddToQueueMenuItemAddsSingleFile

		public void AddToQueueMenuItemAddsSingleFile()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{

					testRunner.ClickByName("File Menu");
					testRunner.Wait(1);
					testRunner.ClickByName("Add File To Queue Menu Item");
					testRunner.Wait(2);

					string queueItemPath = MatterControlUtilities.GetTestItemPath("Fennec_Fox.stl");

					testRunner.Type(queueItemPath);
					testRunner.Wait(1);
					testRunner.Type("{Enter}");
					testRunner.Wait(2);
					resultsHarness.AddTestResult(testRunner.WaitForName("Queue Item Fennec_Fox", 2));

					int queueCount = QueueData.Instance.Count;

					resultsHarness.AddTestResult(queueCount == 1);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:34,代码来源:FileMenuTest.cs

示例10: FileMenuAddPrinter

		public void FileMenuAddPrinter()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);

					testRunner.ClickByName("File Menu");
					testRunner.Wait(1);
					testRunner.ClickByName("Add Printer Menu Item");
					testRunner.Wait(1);
					resultsHarness.AddTestResult(testRunner.WaitForName("Select Make", 3));

					testRunner.ClickByName("Cancel Wizard Button");

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun, queueItemFolderToAdd: QueueTemplate.Three_Queue_Items);

			Assert.IsTrue(testHarness.AllTestsPassed(1));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:25,代码来源:FileMenuTest.cs

示例11: HasHardwareLevelingHidesLevelingSettings

		public void HasHardwareLevelingHidesLevelingSettings()
		{
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					//Add printer that has hardware leveling
					MatterControlUtilities.SelectAndAddPrinter(testRunner, "Airwolf 3D", "HD", true);

					testRunner.Wait(1);
					testRunner.ClickByName("SettingsAndControls");
					testRunner.Wait(1);
					testRunner.ClickByName("Slice Settings Tab");
					testRunner.Wait(1);
					testRunner.ClickByName("User Level Dropdown");
					testRunner.Wait(1);
					testRunner.ClickByName("Advanced Menu Item");
					testRunner.Wait(1);
					testRunner.ClickByName("Printer Tab");
					testRunner.Wait(1);

					//Make sure Print Leveling tab is not visible 
					bool testPrintLeveling = testRunner.WaitForName("Print Leveling Tab", 3);
					resultsHarness.AddTestResult(testPrintLeveling == false);

					//Add printer that does not have hardware leveling
					MatterControlUtilities.SelectAndAddPrinter(testRunner, "Deezmaker", "Bukito", false);
					testRunner.ClickByName("Slice Settings Tab");
					testRunner.Wait(1);
					testRunner.ClickByName("Printer Tab");

					//Make sure Print Leveling tab is visible
					bool printLevelingVisible = testRunner.WaitForName("Print Leveling Tab", 2);
					resultsHarness.AddTestResult(printLevelingVisible == true);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:44,代码来源:HardwareLevelingUITests.cs

示例12: LocalLibraryAddButtonAddSingleItemToLibrary

		public void LocalLibraryAddButtonAddSingleItemToLibrary()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{

					string itemName = "Row Item " + "Fennec Fox";


					//Navigate to Local Library 
					testRunner.ClickByName("Library Tab");
					MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");

					//Make sure that Item does not exist before the test begins
					bool rowItemExists = testRunner.WaitForName(itemName, 1);
					resultsHarness.AddTestResult(rowItemExists == false);

					//Click Local Library Add Button
					testRunner.ClickByName("Library Add Button");

					//Get Library Item to Add
					string rowItemPath = MatterControlUtilities.PathToQueueItemsFolder("Fennec_Fox.stl");
					testRunner.Wait(2);
					testRunner.Type(rowItemPath);
					testRunner.Wait(1);
					testRunner.Type("{Enter}");

					bool rowItemWasAdded = testRunner.WaitForName(itemName, 2);
					resultsHarness.AddTestResult(rowItemWasAdded == true);


					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun);

			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:Joao-Fonseca,项目名称:MatterControl,代码行数:42,代码来源:LocalLibraryTests.cs

示例13: LibraryQueueViewRefreshesOnAddItem

		public void LibraryQueueViewRefreshesOnAddItem()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);

					testRunner.ClickByName("Library Tab", 5);

					MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection");
					testRunner.Wait(1);
					testRunner.ClickByName("Row Item Calibration - Box");
					testRunner.ClickByName("Row Item Calibration - Box View Button");
					testRunner.Wait(1);

					SystemWindow systemWindow;
					GuiWidget partPreview = testRunner.GetWidgetByName("View3DWidget", out systemWindow, 3);
					View3DWidget view3D = partPreview as View3DWidget;

					resultsHarness.AddTestResult(testRunner.ClickByName("3D View Edit", 3));

					resultsHarness.AddTestResult(testRunner.ClickByName("3D View Copy", 3), "Click Copy");
					// wait for the copy to finish
					testRunner.Wait(.1);
					resultsHarness.AddTestResult(testRunner.ClickByName("3D View Remove", 3), "Click Delete");
					resultsHarness.AddTestResult(testRunner.ClickByName("Save As Menu", 3), "Click Save As Menu");
					resultsHarness.AddTestResult(testRunner.ClickByName("Save As Menu Item", 3), "Click Save As");

					testRunner.Wait(1);

					testRunner.Type("0Test Part");
					resultsHarness.AddTestResult(MatterControlUtilities.NavigateToFolder(testRunner, "Local Library Row Item Collection"));

					resultsHarness.AddTestResult(testRunner.ClickByName("Save As Save Button", 1));

					view3D.CloseOnIdle();
					testRunner.Wait(.5);

					// ensure that it is now in the library folder (that the folder updated)
					resultsHarness.AddTestResult(testRunner.WaitForName("Row Item " + "0Test Part", 5), "The part we added should be in the library");

					testRunner.Wait(.5);

					MatterControlUtilities.CloseMatterControl(testRunner); 
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun, queueItemFolderToAdd: QueueTemplate.Three_Queue_Items);

			Assert.IsTrue(testHarness.AllTestsPassed(8));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:53,代码来源:SqLiteLibraryProvider.cs

示例14: HasHardwareLevelingHidesLevelingSettings

		public void HasHardwareLevelingHidesLevelingSettings()
		{
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUtilities.DefaultTestImages);
				{
					MatterControlUtilities.PrepForTestRun(testRunner);
					//Add printer that has hardware leveling
					MatterControlUtilities.AddAndSelectPrinter(testRunner, "Airwolf 3D", "HD");

					MatterControlUtilities.SwitchToAdvancedSettings(testRunner, resultsHarness);

					testRunner.ClickByName("Printer Tab", 1);
					testRunner.Wait(1);

					//Make sure Print Leveling tab is not visible 
					bool testPrintLeveling = testRunner.WaitForName("Print Leveling Tab", 3);
					resultsHarness.AddTestResult(testPrintLeveling == false);

					//Add printer that does not have hardware leveling
					MatterControlUtilities.AddAndSelectPrinter(testRunner, "3D Factory", "MendelMax 1.5");

					testRunner.ClickByName("Slice Settings Tab",1);

					testRunner.ClickByName("Printer Tab",1);

					//Make sure Print Leveling tab is visible
					bool printLevelingVisible = testRunner.WaitForName("Print Leveling Tab", 2);
					resultsHarness.AddTestResult(printLevelingVisible == true);

					MatterControlUtilities.CloseMatterControl(testRunner);
				}
			};

			AutomationTesterHarness testHarness = MatterControlUtilities.RunTest(testToRun, overrideHeight: 800);

			Assert.IsTrue(testHarness.AllTestsPassed(4));
		}
开发者ID:tellingmachine,项目名称:MatterControl,代码行数:38,代码来源:HardwareLevelingUITests.cs

示例15: ClickingConfigureNotificationSettingsButtonOpensWindow

		//DOES NOT WORK
		public void ClickingConfigureNotificationSettingsButtonOpensWindow()
		{
			// Run a copy of MatterControl
			Action<AutomationTesterHarness> testToRun = (AutomationTesterHarness resultsHarness) =>
			{
				AutomationRunner testRunner = new AutomationRunner(MatterControlUITests.DefaultTestImages);
				{

					testRunner.ClickByName("SettingsAndControls", 5);
					testRunner.Wait(2);
					testRunner.ClickByName("Configuration Tab", 6);

					bool printNotificationsWindowExists1 = testRunner.WaitForName("Notification Options Window", 0);
					resultsHarness.AddTestResult(printNotificationsWindowExists1 == false, "Print Notification Window does not exist");

					testRunner.ClickByName("Configure Notification Settings Button", 6);
					bool printNotificationsWindowExists2 = testRunner.WaitForName("Notification Options Window", 3);
					resultsHarness.AddTestResult(printNotificationsWindowExists2 == true, "Print Notifications Window exists after Configure button is clicked");

					MatterControlUITests.CloseMatterControl(testRunner);
				}
			};

#if !__ANDROID__
			// Set the static data to point to the directory of MatterControl
			StaticData.Instance = new MatterHackers.Agg.FileSystemStaticData(Path.Combine("..", "..", "..", "..", "StaticData"));
#endif
			bool showWindow;
			string testDBFolder = "MC_Three_Queue_Items";
			MatterControlUITests.DataFolderState staticDataState = MatterControlUITests.MakeNewStaticDataForTesting(testDBFolder);
			MatterControlApplication matterControlWindow = MatterControlApplication.CreateInstance(out showWindow);
			AutomationTesterHarness testHarness = AutomationTesterHarness.ShowWindowAndExectueTests(matterControlWindow, testToRun, 45);
			MatterControlUITests.RestoreStaticDataAfterTesting(staticDataState, true);
			Assert.IsTrue(testHarness.AllTestsPassed);
			Assert.IsTrue(testHarness.TestCount == 2); // make sure we ran all our tests
		}
开发者ID:lyming531,项目名称:MatterControl,代码行数:37,代码来源:OptionsTabTests.cs


注:本文中的MatterHackers.GuiAutomation.AutomationRunner.WaitForName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。