(browser, by, selector, delay)
return elem
waits for page to load
    Args:
        browser (webdriver): Selenium web driver
        by (By): Selenium By object
        selector (str): selector of element, which will be available on page load
        delay (int): number of seconds to wait
    Returns:
        elem (Element): Selenium element
waits for page to load
    Args:
        browser (webdriver): Selenium web driver
        by (By): Selenium By object
        selector (str): selector of element, which will be available on page load
        delay (int): number of seconds to wait
    Returns:
        elem (Element): Selenium element
waits for page to load Args : browser ( webdriver ) : Selenium web driver by ( By ) : Selenium By object selector ( str ) : selector of element which will be available on page load delay ( int ) : number of seconds to wait Returns : elem ( Element ) : Selenium element
def wait_for_page_load(browser, by, selector, delay):
    """ waits for page to load
    Args:
        browser (webdriver): Selenium web driver
        by (By): Selenium By object
        selector (str): selector of element, which will be available on page load
        delay (int): number of seconds to wait
    Returns:
        elem (Element): Selenium element
    """
    try:
        elem = WebDriverWait(browser, delay).until(EC.presence_of_element_located((by, selector)))
        print("Page is ready!")
    except TimeoutException:
        print("Loading took too much time!")

    return elem
def wait_for_page_load ( browser , by , selector , delay ) : try : elem = WebDriverWait ( browser , delay ) . until ( EC . presence_of_element_located ( ( by , selector ) ) ) print ( "Page is ready!" ) except TimeoutException : print ( "Loading took too much time!" ) return elem