| WaitHelperWait(FuncBoolean, TimeSpan, TimeSpan, String) Method |
Framework to automate tests using Selenium WebDriver
Wait for a condition with given timeout and timeInterval.
Namespace: Ocaramba.HelpersAssembly: OcarambaLite (in OcarambaLite.dll) Version: 1.0.0+d8e789f8644d1a9b63485ad7914acf4f489f3ef9
Syntax public static void Wait(
Func<bool> condition,
TimeSpan timeout,
TimeSpan sleepInterval,
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.
- sleepInterval TimeSpan
- The value [seconds] indicating how often to check for the condition to be true.
- message String
- The exception message.
Exceptions Example How to use it:
WaitHelper.Wait(() => CountFiles(folder, type) > filesNumber, TimeSpan.FromSeconds(waitTime), TimeSpan.FromSeconds(1), timeoutMessage);
See Also