Retries
Retry Methods
The Retry
class has several methods to handle retrying operations. Below you can find information describing those methods:
Method
Exception On Timeout
Returns
Retries Until
void Do(Action target)
Yes
-
No Exception
is raised
bool TryDo(Func<T> target)
No
True
if successful; False
otherwise
No Exception
is raised
T Do(Func<T> target)
Yes
Passed target
result
No Exception
is raised
void DoUntil(Func<bool> target)
Yes
-
No Exception
is raised & Passed target
returns True
bool TryDoUntil(Func<bool> target)
No
True
if successful; False
otherwise
No Exception
is raised & Passed target
returns True
T DoUntil(Func<T> target, Func<T, bool> validation)
Yes
Passed target
result
No Exception
is raised & Passed validation
returns True
Examples
Ensuring a control is clicked.
Ensuring a control contained by a
ControlCollection
is found and clicked.
Ensuring a control is clicked and then validating that the action is affected.
Looking for a control that might or not be present depending on the application state.
Last updated
Was this helpful?