 | WaitHelper.Wait(Func<Boolean>, 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: 4.2.4
Syntaxpublic static void Wait(
Func<bool> condition,
TimeSpan timeout,
TimeSpan sleepInterval,
string message
)
Request Example
Parameters
- condition Func<Boolean>
- 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
ExampleHow to use it:
WaitHelper.Wait(() => CountFiles(folder, type) > filesNumber, TimeSpan.FromSeconds(waitTime), TimeSpan.FromSeconds(1), timeoutMessage);
See Also