Skip to content

Commit 7742461

Browse files
committed
Updated TryGetValue method of Assert.cs
1 parent 8a79437 commit 7742461

File tree

1 file changed

+1
-1
lines changed
  • src/Behavioral.Automation/FluentAssertions

1 file changed

+1
-1
lines changed

src/Behavioral.Automation/FluentAssertions/Assert.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ private static T TryGetValue<T>(Func<T> getValue, TimeSpan wait, int attempts =
112112
{
113113
return getValue();
114114
}
115-
catch (StaleElementReferenceException)
115+
catch (Exception e) when (e is StaleElementReferenceException || e is NoSuchElementException)
116116
{
117117
Thread.Sleep(wait);
118118
if (counter++ == attempts)

0 commit comments

Comments
 (0)