File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Aquality.Selenium/src/Aquality.Selenium/Utilities Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 66namespace Aquality . Selenium . Utilities
77{
88 /// <summary>
9- /// Retries an action or function when <see cref="StaleElementReferenceException"/> occures.
9+ /// Retries an action or function when <see cref="StaleElementReferenceException"/> or <see cref="InvalidElementStateException"/> occures.
1010 /// </summary>
1111 internal sealed class ElementActionRetrier
1212 {
1313 /// <summary>
14- /// Retries the action when <see cref="StaleElementReferenceException"/> occures.
14+ /// Retries the action when <see cref="StaleElementReferenceException"/> or <see cref="InvalidElementStateException"/> occures.
1515 /// </summary>
1616 /// <param name="action">Action to be applied.</param>
1717 public static void DoWithRetry ( Action action )
@@ -24,7 +24,7 @@ public static void DoWithRetry(Action action)
2424 }
2525
2626 /// <summary>
27- /// Retries the function when <see cref="StaleElementReferenceException"/> occures.
27+ /// Retries the function when <see cref="StaleElementReferenceException"/> or <see cref="InvalidElementStateException"/> occures.
2828 /// </summary>
2929 /// <typeparam name="T">Return type of function.</typeparam>
3030 /// <param name="function">Function to be applied.</param>
@@ -61,7 +61,7 @@ public static T DoWithRetry<T>(Func<T> function)
6161
6262 private static bool IsExceptionHandled ( Exception exception )
6363 {
64- return exception is StaleElementReferenceException ;
64+ return exception is StaleElementReferenceException || exception is InvalidElementStateException ;
6565 }
6666 }
6767}
You can’t perform that action at this time.
0 commit comments