本文整理匯總了Python中marketplacetests.marketplace.app.Marketplace.navigate_to_app方法的典型用法代碼示例。如果您正苦於以下問題:Python Marketplace.navigate_to_app方法的具體用法?Python Marketplace.navigate_to_app怎麽用?Python Marketplace.navigate_to_app使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類marketplacetests.marketplace.app.Marketplace
的用法示例。
在下文中一共展示了Marketplace.navigate_to_app方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: test_purchase_app
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import navigate_to_app [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_purchase_app
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import navigate_to_app [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
示例3: test_add_review
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import navigate_to_app [as 別名]
def test_add_review(self):
APP_NAME = 'SoundCloud'
username = self.testvars['marketplace']['username']
password = self.testvars['marketplace']['password']
marketplace = Marketplace(self.marionette, self.MARKETPLACE_DEV_NAME)
marketplace.launch()
marketplace.login(username, password)
details_page = marketplace.navigate_to_app(APP_NAME)
current_time = str(time.time()).split('.')[0]
rating = random.randint(1, 5)
body = 'This is a test %s' % current_time
review_box = details_page.tap_write_review()
review_box.write_a_review(rating, body)
marketplace.wait_for_notification_message_displayed()
# Check if review was added correctly
self.assertEqual(marketplace.notification_message, "Your review was posted")
self.assertEqual(details_page.first_review_rating, rating)
self.assertEqual(details_page.first_review_body, body)
示例4: test_create_confirm_pin
# 需要導入模塊: from marketplacetests.marketplace.app import Marketplace [as 別名]
# 或者: from marketplacetests.marketplace.app.Marketplace import navigate_to_app [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)