本文整理汇总了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)