Press a button having a given tooltip.

def press_by_tooltip(step, tooltip):
    """
    Press a button having a given tooltip.
    """
    with AssertContextManager(step):
        for button in world.browser.find_elements_by_xpath(str(
            '//*[@title="%(tooltip)s" or @data-original-title="%(tooltip)s"]' %
                dict(tooltip=tooltip))):
            try:
                button.click()
                break
            except Exception:
                pass
        else:
            raise AssertionError("No button with tooltip '{0}' found"
                                 .format(tooltip))