def METHOD_NAME(self, selector):
    """ Wait until element matching CSS selector is on the page """
    is_present = lambda driver: self.find(selector)
    msg = 'An element matching "%s" should be on the page' % selector
    element = Wait(self.driver).until(is_present, msg)
    return element