Skip to content

Commit

Permalink
UITest: Use DefaultTimeout * 2 for FirstModalWindow to improve stability
Browse files Browse the repository at this point in the history
  • Loading branch information
jbe2277 committed Sep 24, 2024
1 parent 38ab1ae commit 996ff67
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Samples.UITest/UITest.Core/UITestHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public static Menu ShowContextMenu(this AutomationElement element)

public static Window FirstModalWindow(this Window window, TimeSpan? timeout = null)
{
var result = Retry.WhileEmpty(() => window.ModalWindows, timeout);
var result = Retry.WhileEmpty(() => window.ModalWindows, timeout ?? Retry.DefaultTimeout * 2);
return result?.Result?.FirstOrDefault() ?? throw new ElementNotFoundException($"First modal dialog was not found for window '{window.TryAutomationId()}'");
}

Expand Down

0 comments on commit 996ff67

Please sign in to comment.