Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[py]: 🚀 Improve performance #11310

Merged
merged 3 commits into from
Dec 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions py/selenium/webdriver/support/expected_conditions.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,9 @@ def text_to_be_present_in_element_attribute(locator, attribute_, text_):

def _predicate(driver):
try:
if not element_attribute_to_include(locator, attribute_)(driver):
return False
element_text = driver.find_element(*locator).get_attribute(attribute_)
if element_text is None:
return False
return text_ in element_text
except StaleElementReferenceException:
return False
Expand Down