Constrain Cancel button click to Welcome page only
This commit is contained in:
parent
4d4c4cff8f
commit
d0d52a4b2d
1 changed files with 12 additions and 4 deletions
|
|
@ -327,10 +327,7 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.WaitforDraw(systemWindow);
|
||||
|
||||
// close the welcome message
|
||||
if (testRunner.NameExists("Cancel Wizard Button", 1))
|
||||
{
|
||||
testRunner.ClickByName("Cancel Wizard Button");
|
||||
}
|
||||
testRunner.EnsureWelcomePageClosed();
|
||||
|
||||
// Click 'Add Printer' if not on screen
|
||||
if (!testRunner.NameExists("Select Make", 0.2))
|
||||
|
|
@ -375,6 +372,17 @@ namespace MatterHackers.MatterControl.Tests.Automation
|
|||
testRunner.WaitFor(() => !testRunner.WidgetExists<SetupStepComPortOne>());
|
||||
}
|
||||
|
||||
private static void EnsureWelcomePageClosed(this AutomationRunner testRunner)
|
||||
{
|
||||
// Close the WelcomePage window if active
|
||||
if (testRunner.GetWidgetByName("HeaderRow", out _) is GuiWidget headerRow
|
||||
&& headerRow.Parents<DialogPage>().FirstOrDefault() is WelcomePage welcomePage
|
||||
&& testRunner.NameExists("Cancel Wizard Button", 1))
|
||||
{
|
||||
testRunner.ClickByName("Cancel Wizard Button");
|
||||
}
|
||||
}
|
||||
|
||||
public static void SwitchToHardwareTab(this AutomationRunner testRunner)
|
||||
{
|
||||
testRunner.ClickByName("Hardware Tab");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue