def find_by_tooltip(browser, tooltip):
    """
    Find elements with the given tooltip.

    :param browser: ``world.browser``
    :param tooltip: Tooltip to search for

    Returns: an :class:`ElementSelector`
    """

    return ElementSelector(
        world.browser,
        str('//*[@title=%(tooltip)s or @data-original-title=%(tooltip)s]' %
            dict(tooltip=string_literal(tooltip))),
        filter_displayed=True,
    )