def scroll_down(driver):
    """
    This function will simulate the scroll down of the webpage

    :param driver: webdriver
    :type driver: webdriver

    :return: webdriver
    """

    # Selenium supports execute JavaScript commands in current window / frame
    # get scroll height
    last_height = driver.execute_script("return document.body.scrollHeight")

    # scroll to the end of the page
    driver.execute_script("window.scrollTo(0, {});".format(last_height))

    return driver