本文整理汇总了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"])
示例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'])