def test_element_is_not_visible_element_removed(browser, app_url):
    """
    Given an element has been found
    When it is removed from the page
    Then the is_not_visible() method for this element will return True
    """
    browser.visit(app_url)

    elem = browser.find_by_css("#removed_after_5_seconds")

    # Wait for the element to not be visible
    time.sleep(5.5)

    assert elem.is_not_visible()

    Given an element has been found
    When it is removed from the page
    Then the is_not_visible() method for this element will return True
    
tests/tests_webdriver/test_element_is_visible.py