~tiagosh/messaging-app/open-individual-chat

« back to all changes in this revision

Viewing changes to tests/autopilot/messaging_app/emulators.py

  • Committer: Tiago Salem Herrmann
  • Date: 2015-05-26 20:35:26 UTC
  • Revision ID: tiago.herrmann@canonical.com-20150526203526-6xfvphm6mbg2begk
Add autopilot test

Show diffs side-by-side

added added

removed removed

Lines of Context:
367
367
        message.confirm_removal()
368
368
 
369
369
    @autopilot_logging.log_action(logger.info)
370
 
    def send_message(self, number, message):
 
370
    def send_message(self, numbers, message):
371
371
        """Write a new message and send it.
372
372
 
373
 
        :param number: number of the contact to send message to.
 
373
        :param numbers: phone numbers of contacts to send message to.
374
374
        :param message: the message to be sent.
375
375
 
376
376
        """
377
377
        self.start_new_message()
378
 
        self.type_contact_phone_num(number)
 
378
        # type address number
 
379
        for number in numbers:
 
380
            self.type_contact_phone_num(number)
 
381
            self.keyboard.press_and_release("Enter")
 
382
 
379
383
        self.type_message(message)
380
384
        old_message_count = self.get_multiple_selection_list_view().count
381
385
        self.click_send_button()