'Wait up to ``timeout`` seconds for element specified by ``selector``
to appear, returning the element.'

def wait_for(self, selector, timeout=2):

    end_time = (time.time() + timeout)
    while (time.time() < end_time):
        if self.has_element(selector):
            element = self.find_by_css(selector)
            if element.visible:
                return element
    raise NeverShowedUp(selector)
