def assert_flash(self, text):
    'asserts that message exists in flashes'
    for flash_dom in self.find_elements('.flash'):
        if (flash_dom.text == text):
            return
        print(flash_dom.text)
    raise AssertionError(f'Flash not found for text "{text}"')
asserts that message exists in flashes
def assert_flash(self, text):
    
    for flash_dom in self.find_elements('.flash'):
        if (flash_dom.text == text):
            return
        print(flash_dom.text)
    raise AssertionError(f'Flash not found for text "{text}"')