def _get_selenium_parent(parent):
    """Supply the Selenium webdriver or webelement.

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

    Returns
    -------
    Selenium webdriver or Selenium webelement
        If parent is a browser, the Selenium webdriver.
        If parent is an element, the Selenium webelement.

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