code: def check_infos(self, expected_info_messages=[], allowed_info_messages=[]):
          
          # Close unexpected alerts (it's blocking).
          self.close_alert(ignore_exception=True)
  
          expected_info_messages = set(expected_info_messages)
          allowed_info_messages = set(allowed_info_messages)
          info_messages = set(self.get_info_messages())
          if (
                  info_messages & expected_info_messages != expected_info_messages
                  or
                  (expected_info_messages and info_messages - (expected_info_messages | allowed_info_messages))
          ):
              raise InfoMessagesException(self.current_url, info_messages, expected_info_messages, allowed_info_messages)
docs: This method should be called whenever you need to check if there is some
          info. Normally you need only ``check_expected_infos`` called after each
          test (which you specify only once), but it will check infos only at the
          end of test. When you have big use case and you need to check messages
          on every step, use this.
  
          To parameters you should pass same values like to decorators
          :py:func:`.expected_info_messages` and :py:func:`.allowed_info_messages`.