当前位置: 首页>>代码示例>>Python>>正文


Python Messages.wait_for_message方法代码示例

本文整理汇总了Python中OWDTestToolkit.apps.messages.Messages.wait_for_message方法的典型用法代码示例。如果您正苦于以下问题:Python Messages.wait_for_message方法的具体用法?Python Messages.wait_for_message怎么用?Python Messages.wait_for_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OWDTestToolkit.apps.messages.Messages的用法示例。


在下文中一共展示了Messages.wait_for_message方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Create and Send an MMS with a video attached.
        self.messages.create_and_send_mms("video", [self.phone_number], self.test_msg)
        self.messages.wait_for_message()
        self.messages.verify_mms_received("video", self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:29,代码来源:test_29922.py

示例2: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.music = Music(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()

    def tearDown(self):
        self.music.tap_play()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        # Create and Send an MMS with a audio attached.
        self.messages.create_and_send_mms("audio", [self.phone_number], self.test_msg)

        self.messages.wait_for_message()
        self.messages.verify_mms_received("audio", self.phone_number)
        self.messages.open_attached_file(DOM.Music.frame_locator)
        time.sleep(5)
        self.music.is_player_playing()
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:33,代码来源:test_29923.py

示例3: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.settings = Settings(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Configure Auto Retrieve as "on_with_r = On with roaming option" from messaging settings
        self.settings.launch()
        self.settings.configure_mms_auto_retrieve("on_with_r")

        self.messages.create_and_send_mms("image", [self.phone_number], self.test_msg)
        self.messages.wait_for_message()

        # Verify that the MMS has been received.
        self.messages.verify_mms_received("img", self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:34,代码来源:test_29899.py

示例4: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Test."

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.contacts = Contacts(self)
        self.gallery = Gallery(self)

        # Import contact (adjust to the correct number).
        self.test_num = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.cont = MockContact(tel={"type": "Mobile", "value": self.test_num})
        self.UTILS.reporting.logComment("Using target telephone number " + self.cont["tel"]["value"])

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.general.add_file_to_device('./tests/_resources/imgd.jpg')

        # Launch messages app.
        self.messages.launch()

        # Create a new SMS
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.test_num])

        # Create MMS.
        self.messages.enterSMSMsg(self.test_msg)

        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        send_time = self.messages.last_sent_message_timestamp()
        """
        Open contacts app and create a contact with the same phone number used to send the MMS in the
        previous step
        """

        self.contacts.launch()
        self.contacts.create_contact(self.cont)

        # Switch back to the messages app.
        self.UTILS.home.goHome()
        self.messages.launch()

        # Verify the thread now contains the name of the contact instead of the phone number
        self.UTILS.reporting.logComment("Trying to open the thread with name: " + self.cont["name"])
        self.messages.openThread(self.cont["name"])
        self.messages.wait_for_message(send_time)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:62,代码来源:test_31716.py

示例5: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        timestamp = time.time()
        self.test_msgs = ["Hello world {} at {}".format(i, timestamp) for i in range(3)]

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        for msg in self.test_msgs:
            self.messages.create_and_send_mms("image", [self.phone_number], msg)
            self.messages.wait_for_message()
            self.messages.closeThread()

        self.messages.openThread(self.phone_number)
        self.messages.deleteMessagesInThisThread()
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:33,代码来源:test_29916.py

示例6: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    # Restart device to starting with wifi and 3g disabled.
    #
    def __init__(self, *args, **kwargs):
        kwargs['restart'] = True
        super(test_main, self).__init__(*args, **kwargs)

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        self.test_msg = "Hello World"

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Create and Send an MMS
        self.messages.create_and_send_mms("image", [self.phone_number], self.test_msg)

        # Verify that the MMS has been received.
        self.messages.wait_for_message()
        self.messages.verify_mms_received("img", self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:36,代码来源:test_29896.py

示例7: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Hello World"

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.test_msg = "Test message for test 31727"
        self.UTILS.general.add_file_to_device('./tests/_resources/300x300.png')

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.messages.launch()
        self.messages.startNewSMS()
        self.messages.addNumbersInToField([self.phone_number])
        self.messages.enterSMSMsg(self.test_msg)
        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)
        self.messages.sendSMS()

        self.messages.wait_for_message()
        self.messages.check_last_message_contents(self.test_msg, mms=True)
        self.messages.verify_mms_received('img', self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:36,代码来源:test_31727.py

示例8: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Test."

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.contacts = Contacts(self)

        # Import contact (adjust to the correct number).
        self.test_num = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.cont = MockContact(tel={"type": "Mobile", "value": self.test_num})
        self.UTILS.reporting.logComment("Using target telephone number " + self.cont["tel"]["value"])

        self.data_layer.delete_all_sms()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Launch messages app.
        self.messages.launch()

        # Create a new SMS
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.test_num])

        # Create SMS.
        self.messages.enterSMSMsg(self.test_msg)

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        self.messages.wait_for_message()
        self.messages.go_back()
        """
        Open contacts app and create a contact with the same phone number used to send the SMS in the
        previous step
        """

        self.contacts.launch()
        self.contacts.create_contact(self.cont)

        # Switch back to the messages app.
        # self.UTILS.app.switchToApp("Messages")
        self.messages.launch()

        # Verify the thread now contains the name of the contact instead of the phone number
        self.UTILS.reporting.logComment("Trying to open the thread with name: " + self.cont["name"])
        self.messages.openThread(self.cont["name"])
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:58,代码来源:test_26845.py

示例9: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Test message."

    def setUp(self):
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.contacts = Contacts(self)

        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.contact = MockContact()
        self.UTILS.general.insertContact(self.contact)

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        # Launch messages app.
        self.messages.launch()

        # Create and send a new test message.
        self.messages.create_and_send_sms([self.phone_number], "Test message.")
        self.messages.wait_for_message()

        # Tap the header to create a contact.
        self.messages.header_addToContact()

        # Select our contact.
        self.contacts.view_contact(self.contact["givenName"], False)

        # Check the phone number.
        second_phone = self.UTILS.element.getElement(("id", "number_1"), "2nd phone number.")
        self.UTILS.test.test(second_phone.get_attribute("value") == self.phone_number,
                             "Contact now has a 2nd number which is '{}' (it was '{}').".format(self.phone_number, second_phone.get_attribute("value")))

        # Press the Done button.
        done_btn = self.UTILS.element.getElement(DOM.Contacts.edit_update_button, "Update button")
        done_btn.tap()

        # Wait for contacts app to close and return to sms app.
        self.marionette.switch_to_frame()
        self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@src, '{}')]".format(DOM.Contacts.frame_locator[1])),
                                              "Contacts iframe")

        self.UTILS.iframe.switchToFrame(*DOM.Messages.frame_locator)

        # Verify the header is now the name,
        header = self.UTILS.element.getElement(DOM.Messages.message_header, "Message header")
        self.UTILS.test.test(header.text == self.contact["name"],
                             "Message header has been changed to match the contact (it was '{}').".format(header.text))

        # Go back to the threads view and check the message name there too.
        self.messages.go_back()
        self.messages.openThread(self.contact["name"])
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:58,代码来源:test_26988.py

示例10: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending sms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):
        self.UTILS.statusbar.clearAllStatusBarNotifs()
        self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg')

        # Create message.
        sms_message = "Test"

        # Launch messages app.
        self.messages.launch()

        # Create and send a new test message.
        self.messages.create_and_send_sms([self.phone_number], sms_message)
        self.messages.wait_for_message()
        self.messages.go_back()

        self.UTILS.element.waitForNotElements(DOM.Messages.mms_icon, "MMS Icon")

        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.phone_number])

        # Create MMS.
        self.messages.enterSMSMsg(sms_message)

        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        self.messages.wait_for_message()

        self.UTILS.iframe.switchToFrame(*DOM.Messages.frame_locator)
        self.messages.go_back()

        self.messages.checkMMSIcon(self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:58,代码来源:test_31720.py

示例11: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.target_num = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.test_msg = "Test."
        self.data_layer.delete_all_sms()

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        self.UTILS.statusbar.toggleViaStatusBar('airplane')

    def test_run(self):

        # Create a new SMS
        self.messages.launch()
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.target_num])

        # Create SMS.
        self.messages.enterSMSMsg(self.test_msg)

        # Click send.
        self.messages.sendSMS()
        send_time = self.messages.last_sent_message_timestamp()

        # Wait for the SMS to arrive.
        self.messages.wait_for_message(send_time=send_time)

        self.UTILS.home.goHome()

        # Put the phone into airplane mode.
        self.UTILS.statusbar.toggleViaStatusBar('airplane')

        self.UTILS.reporting.debug("*** Launching messages again!!!")
        self.messages.launch()

        # Open sms app and go to the previous thread
        self.messages.openThread(self.target_num)

        # Create another SMS.
        self.messages.enterSMSMsg(self.test_msg)

        # Click send.
        self.messages.sendSMS()

        # Check that popup appears.
        self.messages.checkAirplaneModeWarning()
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:56,代码来源:test_26863.py

示例12: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Hello World"
    test_subject = "My Subject"

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Load an image file into the device.
        self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg')

        # Launch messages app.
        self.messages.launch()

        # Create a new SMS
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.phone_number])

        # Create MMS.
        self.messages.enterSMSMsg(self.test_msg)
        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)

        # add subject
        self.messages.addSubject(self.test_subject)

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        self.messages.wait_for_message()

        #  Forward a message in this case we use "mmssub" to send a mms with subject.
        self.messages.forwardMessage("mmssub", self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:54,代码来源:test_31572.py

示例13: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Test."

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)
        self.music = Music(self)
        self.settings = Settings(self)

        # Establish which phone number to use.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.UTILS.reporting.logComment("Sending mms to telephone number " + self.phone_number)

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Load files into the device.
        self.UTILS.general.add_file_to_device('./tests/_resources/imgd.jpg')
        self.UTILS.general.add_file_to_device('./tests/_resources/MP3.mp3')

        # Launch messages app.
        self.messages.launch()

        # Create a new SMS
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.phone_number])

        # Create MMS.
        self.messages.enterSMSMsg(self.test_msg)

        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)

        self.messages.create_mms_music()
        self.music.click_on_song_mms()

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        self.messages.wait_for_message()
        self.messages.verify_mms_received('img', self.phone_number)
        self.messages.verify_mms_received('audio', self.phone_number)
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:54,代码来源:test_31717.py

示例14: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Test message."

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.contacts = Contacts(self)

        self.num1 = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.num2 = "621234567"

    def tearDown(self):
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Launch messages app.
        self.messages.launch()

        # Create and send a new test message.
        self.messages.create_and_send_sms([self.num1], "Test {} number.".format(self.num2))
        self.messages.wait_for_message()

        # Tap the header to create a contact.
        self.messages.header_createContact()
        self.UTILS.iframe.switchToFrame(*DOM.Contacts.frame_locator)

        # Cancel the action.
        form_header = self.UTILS.element.getElement(DOM.Contacts.contact_form_header, "Contact form header")
        form_header.tap(25, 25)

        # Wait for the contacts app to go away.
        self.marionette.switch_to_frame()
        self.UTILS.element.waitForNotElements(("xpath", "//iframe[contains(@src, '{}')]".\
                                               format(DOM.Contacts.frame_locator[1])), "Contacts iframe")

        # Kill the SMS app (and all others).
        self.apps.kill_all()

        # Open the contacts app.
        self.contacts.launch()

        # Verify that there are no contacts.
        self.UTILS.element.waitForElements(("xpath", "//p[contains(text(), 'No contacts')]"),
                                    "No contacts message")
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:52,代码来源:test_26986.py

示例15: test_main

# 需要导入模块: from OWDTestToolkit.apps.messages import Messages [as 别名]
# 或者: from OWDTestToolkit.apps.messages.Messages import wait_for_message [as 别名]
class test_main(GaiaTestCase):

    test_msg = "Hello World"

    def setUp(self):

        # Set up child objects...
        GaiaTestCase.setUp(self)
        self.UTILS = UTILS(self)
        self.messages = Messages(self)
        self.gallery = Gallery(self)

        # Prepare the contact we're going to insert.
        self.phone_number = self.UTILS.general.get_config_variable("phone_number", "custom")
        self.contact = MockContact(tel={'type': '', 'value': self.phone_number})
        self.UTILS.general.insertContact(self.contact)
        self.data_layer.delete_all_sms()
        self.UTILS.statusbar.clearAllStatusBarNotifs()

    def tearDown(self):
        self.UTILS.general.remove_files()
        self.UTILS.reporting.reportResults()
        GaiaTestCase.tearDown(self)

    def test_run(self):

        # Load an image file into the device.
        self.UTILS.general.add_file_to_device('./tests/_resources/80x60.jpg')

        # Launch messages app.
        self.messages.launch()

        # Create a new SMS
        self.messages.startNewSMS()

        # Insert the phone number in the To field
        self.messages.addNumbersInToField([self.phone_number])

        # Create MMS.
        self.messages.enterSMSMsg(self.test_msg)
        self.messages.create_mms_image()
        self.gallery.click_on_thumbnail_at_position_mms(0)

        # Click send and wait for the message to be received
        self.messages.sendSMS()
        self.messages.wait_for_message()

        self.messages.forwardMessageToMultipleRecipients("mms", self.phone_number, self.contact["name"])
开发者ID:owdqa,项目名称:owd_test_cases,代码行数:50,代码来源:test_31571.py


注:本文中的OWDTestToolkit.apps.messages.Messages.wait_for_message方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。