def html(parent):
    """Get the HTML of an element or page.

    This is a wrapper for Selenium's WebDriver.page_source and
    WebElement.get_attribute("outerHTML")

    Parameters
    ----------
    parent : browser or element
        The browser or element.

    Returns
    -------
    str
        If parent is a browser, the HTML of the whole page.
        If parent is an element, the HTML of the element.

    """
    if isinstance(parent, parent.element_class):
        return parent.selenium_webelement.get_attribute("outerHTML")
    return parent.selenium_webdriver.page_source