'Verify for confirmation message is present or hidden.'

def verify_confirmation_message(self, message, verify_hidden=False):

    def _verify_message():
        '    promise    function    to    check    confirmation    message    state    '
        text = self.q(css='#page-alert    .alert.confirmation    #alert-confirmation-title').text
        return ((text and (message not in text[0])) if verify_hidden else (text and (message in text[0])))
    self.wait_for(_verify_message, description='confirmation    message    {status}'.format(status=('hidden' if verify_hidden else 'present')))
