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


Python Messages.wait_for_message_received方法代码示例

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


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

示例1: TestDialerFromMessage

# 需要导入模块: from gaiatest.apps.messages.app import Messages [as 别名]
# 或者: from gaiatest.apps.messages.app.Messages import wait_for_message_received [as 别名]
class TestDialerFromMessage(GaiaTestCase):
    def setUp(self):
        GaiaTestCase.setUp(self)

    def test_dialer_from_message(self):

        # Send a SMS to the device
        _text_message_content = "Automated Test %s" % str(time.time())

        # Open first received message
        self.messages = Messages(self.marionette)
        self.messages.launch()

        self.data_layer.send_sms(self.testvars["carrier"]["phone_number"], _text_message_content)
        self.apps.switch_to_displayed_app()

        self.messages.wait_for_message_received(timeout=180)

        # Sometimes tap is done on the notification instead of message header
        self.marionette.switch_to_frame()
        system = System(self.marionette)
        system.wait_for_notification_toaster_not_displayed()

        self.apps.switch_to_displayed_app()
        message_thread = self.messages.tap_first_received_message()

        # Check the phone number
        keypad = message_thread.tap_call()
        self.assertEquals(keypad.phone_number, self.testvars["carrier"]["phone_number"])
开发者ID:RazorPandaFang,项目名称:gaia,代码行数:31,代码来源:test_sms_to_dialer.py

示例2: TestDialerFromMessage

# 需要导入模块: from gaiatest.apps.messages.app import Messages [as 别名]
# 或者: from gaiatest.apps.messages.app.Messages import wait_for_message_received [as 别名]
class TestDialerFromMessage(GaiaTestCase):

    def setUp(self):
        GaiaTestCase.setUp(self)

    def test_dialer_from_message(self):

        # Send a SMS to the device
        _text_message_content = "Automated Test %s" % str(time.time())

        # Open first received message
        self.messages = Messages(self.marionette)
        self.messages.launch()

        self.data_layer.send_sms(self.testvars['carrier']['phone_number'], _text_message_content)
        self.apps.switch_to_displayed_app()

        self.messages.wait_for_message_received(timeout=180)

        message_thread = self.messages.tap_first_received_message()

        # Check the phone number
        message_thread.tap_header()
        keypad = message_thread.tap_call()
        self.assertEquals(keypad.phone_number, self.testvars['carrier']['phone_number'])
开发者ID:Bharatpattani,项目名称:gaia,代码行数:27,代码来源:test_sms_to_dialer.py


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