UITestControl.WaitForCondition<T> Method (T, Predicate<T>)

Blocks the current thread until the specified condition is met, or until the default time-out expires.

Namespace:  Microsoft.VisualStudio.TestTools.UITesting
Assembly:  Microsoft.VisualStudio.TestTools.UITesting (in Microsoft.VisualStudio.TestTools.UITesting.dll)

Syntax

'Declaration
Public Shared Function WaitForCondition(Of T) ( _
    conditionContext As T, _
    conditionEvaluator As Predicate(Of T) _
) As Boolean
public static bool WaitForCondition<T>(
    T conditionContext,
    Predicate<T> conditionEvaluator
)
public:
generic<typename T>
static bool WaitForCondition(
    T conditionContext, 
    Predicate<T>^ conditionEvaluator
)
static member WaitForCondition : 
        conditionContext:'T * 
        conditionEvaluator:Predicate<'T> -> bool
JScript does not support generic types or methods.

Type Parameters

  • T
    The Type that specifies the Type for the condition and predicate.

Parameters

  • conditionContext
    Type: T

    The context to evaluate the condition.

  • conditionEvaluator
    Type: Predicate<T>

    The delegate to evaluate the condition.

Return Value

Type: Boolean
true if the condition is met before the time-out; otherwise, false.

.NET Framework Security

See Also

Reference

UITestControl Class

WaitForCondition Overload

Microsoft.VisualStudio.TestTools.UITesting Namespace

WaitForReadyTimeout