def wait_xpath(driver, expr, timeout=20):
    """
    Takes an XPath expression, and waits at most `timeout` seconds until it exists
    """
    wait = WebDriverWait(driver, timeout)
    try:
        wait.until(EC.presence_of_element_located((By.XPATH, expr)))
    except SELENIUM_EXCEPTIONS:
        return

    Takes an XPath expression, and waits at most `timeout` seconds until it exists
    
deletefb/tools/common.py