Click or drag to resize

WaitHelperWait(FuncBoolean, TimeSpan, String) Method

Framework to automate tests using Selenium WebDriver
Wait for a condition with given timeout.

Namespace: Ocaramba.Helpers
Assembly: OcarambaLite (in OcarambaLite.dll) Version: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax
C#
public static void Wait(
	Func<bool> condition,
	TimeSpan timeout,
	string message
)
Request Example

Parameters

condition  FuncBoolean
The condition to be met.
timeout  TimeSpan
The timeout value [seconds] indicating how long to wait for the condition.
message  String
The exception message.
Exceptions
ExceptionCondition
WaitTimeoutExceptionTimeout exception when condition is not met.
Example
How to use it:
C#
WaitHelper.Wait(() => CountFiles(folder, type) > filesNumber, TimeSpan.FromSeconds(waitTime), timeoutMessage);
See Also