Skip to content

Commit 11527ec

Browse files
committed
changes : empty str condition
1 parent 61d8a00 commit 11527ec

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

py/selenium/webdriver/support/expected_conditions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,9 @@ def text_to_be_present_in_element_value(
428428
def _predicate(driver: WebDriverOrWebElement):
429429
try:
430430
element_text = driver.find_element(*locator).get_attribute("value")
431-
return element_text is not None and text_ in element_text
431+
if element_text is None:
432+
return False
433+
return text_ in element_text
432434
except StaleElementReferenceException:
433435
return False
434436

0 commit comments

Comments
 (0)