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


Python Email.wait_for_search_textbox_displayed方法代码示例

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


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

示例1: TestSetupAndSendIMAPEmail

# 需要导入模块: from gaiatest.apps.email.app import Email [as 别名]
# 或者: from gaiatest.apps.email.app.Email import wait_for_search_textbox_displayed [as 别名]
class TestSetupAndSendIMAPEmail(GaiaTestCase):

    def setUp(self):
        email = GaiaTestEnvironment(self.testvars).email
        if not email.get('imap'):
            raise SkipTest('IMAP account details not present in test variables.')
        elif not email.get('smtp'):
            raise SkipTest('SMTP account details not present in test variables.')

        GaiaTestCase.setUp(self)
        self.connect_to_local_area_network()

        self.email = Email(self.marionette)
        self.email.launch()

    def test_setup_and_send_imap_email(self):
        """
        https://moztrap.mozilla.org/manage/case/6113/
        https://moztrap.mozilla.org/manage/case/6114/
        """
        # setup IMAP account
        self.email.setup_IMAP_email(self.environment.email['imap'],
                                    self.environment.email['smtp'])

        # check header area
        self.assertTrue(self.email.header.is_compose_visible)
        self.assertTrue(self.email.header.is_menu_visible)
        self.assertEqual(self.email.header.label, 'Inbox')

        # check toolbar area
        self.assertTrue(self.email.toolbar.is_edit_visible)
        self.assertTrue(self.email.toolbar.is_refresh_visible)

        # check account has emails
        self.email.wait_for_emails_to_sync()
        self.assertGreater(len(self.email.mails), 0)

        # Bug 878772 - email app doesn't show the last emails by default
        self.email.mails[0].scroll_to_message()

        curr_time = repr(time.time()).replace('.', '')
        _subject = 's%s' % curr_time
        _body = 'b%s' % curr_time
        new_email = self.email.header.tap_compose()

        new_email.type_to(self.environment.email['imap']['email'])
        new_email.type_subject(_subject)
        new_email.type_body(_body)

        self.email = new_email.tap_send()

        self.email.wait_for_email(_subject)
        self.email.wait_for_search_textbox_displayed()

        # tap the email that has the expected subject
        read_email = self.email.tap_email_subject(_subject)

        self.assertEqual(_body, read_email.body.splitlines()[0])
        self.assertEqual(_subject, read_email.subject)
开发者ID:Archaeopteryx,项目名称:gaia,代码行数:61,代码来源:test_setup_and_send_imap_email.py


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