def _wait_till_text_present_in_element(self, element, text, timeout=None):
    'Waiting for a text to appear in a certain element very often is\n        actually waiting for a _different_ element with a different text to\n        appear in place of an old element. So a way to avoid capturing stale\n        element reference should be provided for this use case.\n\n        Better to wrap getting entity status cell in a lambda\n        to avoid problems with cell being replaced with totally different\n        element by Javascript\n        '

    def predicate(_):
        elt = (element() if hasattr(element, '__call__') else element)
        return self._is_text_visible(elt, text)
    self._wait_until(predicate, timeout)
Waiting for a text to appear in a certain element very often is
actually waiting for a _different_ element with a different text to
appear in place of an old element. So a way to avoid capturing stale
element reference should be provided for this use case.

Better to wrap getting entity status cell in a lambda
to avoid problems with cell being replaced with totally different
element by Javascript
def _wait_till_text_present_in_element(self, element, text, timeout=None):
    'Waiting for a text to appear in a certain element very often is\n        actually waiting for a _different_ element with a different text to\n        appear in place of an old element. So a way to avoid capturing stale\n        element reference should be provided for this use case.\n\n        Better to wrap getting entity status cell in a lambda\n        to avoid problems with cell being replaced with totally different\n        element by Javascript\n        '

    def predicate(_):
        elt = (element() if hasattr(element, '__call__') else element)
        return self._is_text_visible(elt, text)
    self._wait_until(predicate, timeout)