本文整理匯總了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))
示例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()