This documentation is archived and is not being maintained.

UITestControl.WaitForCondition(Of T) Method (T, Predicate(Of 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)

'Declaration
Public Shared Function WaitForCondition(Of T) ( _
	conditionContext As T, _
	conditionEvaluator As Predicate(Of T) _
) As Boolean

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: System.Predicate(Of T)
The delegate to evaluate the condition.

Return Value

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

Show: