def wait_for_text_visible(driver, text, selector, by=By.CSS_SELECTOR,
                          timeout=settings.LARGE_TIMEOUT):

    element = None
    for x in range(int(timeout * 10)):
        try:
            element = driver.find_element(by=by, value=selector)
            if element.is_displayed():
                if text in element.text:
                    return element
                else:
                    element = None
                    raise Exception()
        except Exception:
            time.sleep(0.1)
    if not element:
        raise ElementNotVisibleException(
            "Expected text [%s] for [%s] was not visible after %s seconds!" %
            (text, selector, timeout))
Searches for the specified element by the given selector. Returns the
dataset/ETHPy150Open mdmintz/SeleniumBase/seleniumbase/fixtures/page_actions.py/wait_for_text_visible