本文整理匯總了Python中marketplacetests.marketplace.app.Marketplace.set_region方法的典型用法代碼示例。如果您正苦於以下問題:Python Marketplace.set_region方法的具體用法?Python Marketplace.set_region怎麽用?Python Marketplace.set_region使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類marketplacetests.marketplace.app.Marketplace
的用法示例。
在下文中一共展示了Marketplace.set_region方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_purchase_app
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import set_region [as 別名]
def test_purchase_app(self):
APP_NAME = 'Test Zippy With Me'
PIN = '1234'
username = self.testvars['marketplace']['username']
password = self.testvars['marketplace']['password']
if self.apps.is_app_installed(APP_NAME):
self.apps.uninstall(APP_NAME)
marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
marketplace.launch()
marketplace.login(username, password)
marketplace.set_region('United States')
details_page = marketplace.navigate_to_app(APP_NAME)
payment = details_page.tap_purchase_button()
payment.create_pin(PIN)
payment.wait_for_buy_app_section_displayed()
self.assertIn(APP_NAME, payment.app_name)
payment.tap_buy_button()
# Confirm the installation and wait for the app icon to be present
confirm_install = ConfirmInstall(self.marionette)
confirm_install.tap_confirm()
self.assertEqual('%s installed' % APP_NAME, marketplace.install_notification_message)
marketplace.switch_to_marketplace_frame()
self.assertEqual('Launch', details_page.install_button_text)
示例2: test_search_paid_app
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import set_region [as 別名]
def test_search_paid_app(self):
APP_NAME = 'Test Zippy With Me'
if self.apps.is_app_installed(APP_NAME):
self.apps.uninstall(APP_NAME)
marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
marketplace.launch()
marketplace.set_region('United States')
search_results = marketplace.search(APP_NAME).search_results
self.assertGreater(len(search_results), 0, 'No results found.')
for result in search_results:
if result.name == APP_NAME:
saved_price = result.install_button_text
details_page = result.tap_app()
self.assertEqual(saved_price, details_page.install_button_text)
return True
# app not found
self.fail('The app: %s was not found.' % APP_NAME)
開發者ID:bobsilverberg,項目名稱:marketplace-tests-gaia,代碼行數:27,代碼來源:test_marketplace_search_for_paid_app.py
示例3: test_purchase_app
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import set_region [as 別名]
def test_purchase_app(self):
APP_NAME = 'Test Zippy With Me'
username = self.testvars['marketplace']['username']
password = self.testvars['marketplace']['password']
if self.apps.is_app_installed(APP_NAME):
self.apps.uninstall(APP_NAME)
marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
marketplace.launch()
marketplace.set_region('United States')
details_page = marketplace.navigate_to_app(APP_NAME)
ff_accounts = details_page.tap_purchase_button(is_logged_in=False)
ff_accounts.login(username, password)
# Switch back to the Marketplace frame and wait for the install button to update
marketplace.switch_to_marketplace_frame()
Wait(marionette=self.marionette, ignored_exceptions=StaleElementException)\
.until(lambda m: details_page.install_button_text == 'Purchasing')
開發者ID:bobsilverberg,項目名稱:marketplace-tests-gaia,代碼行數:24,代碼來源:test_marketplace_login_during_purchase.py
示例4: test_create_confirm_pin
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import set_region [as 別名]
def test_create_confirm_pin(self):
APP_NAME = 'Test Zippy With Me'
PIN = '1234'
username = self.testvars['marketplace']['username']
password = self.testvars['marketplace']['password']
if self.apps.is_app_installed(APP_NAME):
self.apps.uninstall(APP_NAME)
marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
marketplace.launch()
marketplace.login(username, password)
marketplace.set_region('United States')
details_page = marketplace.navigate_to_app(APP_NAME)
payment = details_page.tap_purchase_button()
payment.create_pin(PIN)
payment.wait_for_buy_app_section_displayed()
self.assertIn(APP_NAME, payment.app_name)