Skip to content

Commit 9d9a429

Browse files
TillerBurremilykl
andauthored
Update dash/testing/wait.py
Co-authored-by: Emily KL <[email protected]>
1 parent 92f9294 commit 9d9a429

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

dash/testing/wait.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,8 @@ def __call__(self, driver):
107107
try:
108108
elem = self._get_element(driver)
109109
logger.debug("text to equal {%s} => expected %s", elem.text, self.text)
110-
if (value := elem.get_attribute("value")) is not None:
111-
return str(elem.text) == self.text or str(value) == self.text
112-
return str(elem.text) == self.text
110+
value = elem.get_attribute("value")
111+
return str(elem.text) == self.text or (value is not None and str(value) == self.text)
113112
except WebDriverException:
114113
return False
115114

0 commit comments

Comments
 (0)