UntilNotNullAsync(Func<Task<T?>>, String?) Method

Definition

Assembly HeadlessTestingFramework.dll

Waits until a function returns a non-null value (async).

public Task<T> UntilNotNullAsync<T>(Func<Task<T?>> func, string? message = null)
    where T : class

Type parameters

T
The result type.

Parameters

func
Func<Task<T>>

The async function to evaluate.

message
String

Optional message for timeout exception.

Returns

Task<T>
The non-null result.