Assert provided text is visible within n seconds.

    Be aware this text could be anywhere on the screen. Also be aware that
    it might cross several HTML nodes. No determination is made between
    block and inline nodes. Whitespace can be affected.

def should_see_in_seconds(self, text, timeout):
    """
    Assert provided text is visible within n seconds.

    Be aware this text could be anywhere on the screen. Also be aware that
    it might cross several HTML nodes. No determination is made between
    block and inline nodes. Whitespace can be affected.
    """

    def check_element():
        """Check for an element with the given content."""

        assert contains_content(world.browser, text), \
            "Expected element with the given text."

    wait_for(check_element)(timeout=int(timeout))