From aa67461cbcf8e067873d611425d68df4f474f30a Mon Sep 17 00:00:00 2001 From: Mark Collin <1205116+Ardesco@users.noreply.github.com> Date: Mon, 7 Mar 2022 13:29:18 +0000 Subject: [PATCH] Stop ElementToBeClickable from throwing a StaleElementReferenceException --- src/WaitHelpers/ExpectedConditions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/WaitHelpers/ExpectedConditions.cs b/src/WaitHelpers/ExpectedConditions.cs index b007d75..b5262d6 100644 --- a/src/WaitHelpers/ExpectedConditions.cs +++ b/src/WaitHelpers/ExpectedConditions.cs @@ -432,9 +432,9 @@ public static Func ElementToBeClickable(By locator) { return (driver) => { - var element = ElementIfVisible(driver.FindElement(locator)); try { + var element = ElementIfVisible(driver.FindElement(locator)); if (element != null && element.Enabled) { return element;