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


Python Marketplace.wait_for_notification_message_not_displayed方法代码示例

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


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

示例1: test_search_and_install_app

# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_notification_message_not_displayed [as 别名]
    def test_search_and_install_app(self):
        marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        marketplace.launch()

        self.app_name = marketplace.popular_apps[0].name
        app_author = marketplace.popular_apps[0].author
        results = marketplace.search(self.app_name)

        self.assertGreater(len(results.search_results), 0, 'No results found.')

        first_result = results.search_results[0]

        self.assertEquals(first_result.name, self.app_name, 'First app has the wrong name.')
        self.assertEquals(first_result.author, app_author, 'First app has the wrong author.')

        # Find and click the install button to the install the web app
        self.assertEquals(first_result.install_button_text, 'Free', 'Incorrect button label.')

        first_result.tap_install_button()
        self.confirm_installation()
        marketplace.wait_for_notification_message_not_displayed()
        self.APP_INSTALLED = True

        # Check that the icon of the app is on the homescreen
        homescreen = Homescreen(self.marionette)
        homescreen.switch_to_homescreen_frame()

        self.assertTrue(homescreen.is_app_installed(self.app_name))
开发者ID:AndreiH,项目名称:marketplace-tests-gaia,代码行数:30,代码来源:test_marketplace_search_and_install_app.py

示例2: test_marketplace_purchase_app_on_dev_with_mocked_bango

# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_notification_message_not_displayed [as 别名]
    def test_marketplace_purchase_app_on_dev_with_mocked_bango(self):

        marketplace = Marketplace(self.marionette, 'Marketplace Dev')
        marketplace.launch()

        # Tap settings and sign in in Marketplace
        settings = marketplace.tap_settings()
        persona = settings.tap_sign_in()

        # login with PersonaTestUser account
        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        marketplace.launch()

        # wait for the page to refresh and the sign out button to be visible
        settings.wait_for_sign_out_button()

        # Well I dunno, it just needs this
        time.sleep(3)

        settings.select_region("Spain")

        time.sleep(3)

        settings.tap_save_changes()
        marketplace.wait_for_notification_message_not_displayed()

        # search for a paid app and tap on the price
        search = marketplace.search(self._APP_NAME)
        bango = search.search_results[0].tap_purchase_button()

        # pay app
        bango.create_pin('1234')

        # make fake payment
        bango.make_fake_payment()
        self.marionette.switch_to_frame()

        # At gaia System level, complete the installation prompt
        self._confirm_installation()

        # Switch into homescreen frame
        homescreen_frame = self.marionette.find_element(*self._homescreen_iframe_locator)
        self.marionette.switch_to_frame(homescreen_frame)

        # Not overly concerned about it being visible, only present
        self.assertTrue(self.is_element_present(*self._app_icon_locator))
开发者ID:chirarobert,项目名称:marketplace-tests-gaia,代码行数:51,代码来源:test_marketplace_purchase_app_on_dev_with_mocked_bango.py

示例3: TestMarketplaceLogin

# 需要导入模块: from marketplacetests.marketplace.app import Marketplace [as 别名]
# 或者: from marketplacetests.marketplace.app.Marketplace import wait_for_notification_message_not_displayed [as 别名]
class TestMarketplaceLogin(GaiaTestCase):

    MARKETPLACE_DEV_NAME = 'Marketplace Dev'

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

        self.user = PersonaTestUser().create_user(verified=True,
                                                  env={"browserid": "firefoxos.persona.org", "verifier": "marketplace-dev.allizom.org"})

        self.marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
        self.marketplace.launch()

    def test_login_marketplace(self):
        # https://moztrap.mozilla.org/manage/case/4134/

        self.marketplace.wait_for_setting_displayed()
        settings = self.marketplace.tap_settings()
        persona = settings.tap_sign_in()

        persona.login(self.user.email, self.user.password)

        # switch back to Marketplace
        self.marionette.switch_to_frame()
        self.marketplace.launch()

        # wait for signed-in notification at the bottom of the screen to clear
        self.marketplace.wait_for_notification_message_not_displayed()

        # Verify that user is logged in
        self.assertEqual(self.user.email, settings.email)

        # Sign out, which should return to the Marketplace home screen
        settings.tap_sign_out()

        # Verify that user is signed out
        settings.wait_for_sign_in_displayed()
开发者ID:AlinT,项目名称:marketplace-tests-gaia,代码行数:41,代码来源:test_marketplace_login.py


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