Provides utilities for waiting on specific conditions. More advanced than ExpectedConditions with support for custom predicates.
public class WaitHelper
var wait = new WaitHelper(TimeSpan.FromSeconds(10));
// Wait for element to be visible
await wait.UntilAsync(() => element.IsVisible);
// Wait for element with custom polling
var found = await wait.UntilNotNullAsync(() => FindElement("button"));
// Wait with progress callback
await wait.UntilAsync(() => IsComplete(),
onProgress: remaining => Console.WriteLine($"Time remaining: {remaining}"));
kind:method, kind:property, kind:ctor. Press Esc to clear.WaitHelper()Creates a new WaitHelper with default timeout (30 seconds).WaitHelper(TimeSpan, Nullable<TimeSpan>)Creates a new WaitHelper with specified timeout.ForCountAsync<T>(Func<IEnumerable<T>>, Int32, String?)Waits for a collection to have a specific count.ForDisabledAsync(Control, String?)Waits for an element to become disabled.ForElementAsync(Func<Control?>, String?)Waits for an element to exist (be found).ForEnabledAsync(Control, String?)Waits for an element to become enabled.ForFocusedAsync(Control, String?)Waits for an element to receive focus.ForHiddenAsync(Control, String?)Waits for an element to become hidden.ForMinimumCountAsync<T>(Func<IEnumerable<T>>, Int32, String?)Waits for a collection to have at least a certain count.ForPropertyValueAsync<T>(AvaloniaObject, AvaloniaProperty<T>, T, String?)Waits for an element's property to have a specific value.ForTextAsync(Control, String, String?)Waits for text content to match.ForTextContainsAsync(Control, String, String?)Waits for text content to contain a substring.ForTextNotEmptyAsync(Control, String?)Waits for text to be non-empty.ForVisibleAsync(Control, String?)Waits for an element to become visible.TryForElementAsync(Func<Control?>)Tries to wait for an element, returns null on timeout.TryUntilAsync(Func<Boolean>)Tries to wait for a condition, returns false on timeout.UntilAsync(Func<Boolean>, String?, Action<TimeSpan>?)Waits until a condition is true.UntilAsync(Func<Task<Boolean>>, String?)Waits until an async condition is true.UntilNotNullAsync<T>(Func<T?>, String?)Waits until a function returns a non-null value.UntilNotNullAsync<T>(Func<Task<T?>>, String?)Waits until a function returns a non-null value (async).UntilOnUIThreadAsync(Func<Boolean>, String?)Waits until a condition is true (runs on UI thread).With(TimeSpan)Creates a fluent wait builder.