本文整理汇总了Python中gaiatest.apps.cost_control.app.CostControl.wait_to_be_displayed方法的典型用法代码示例。如果您正苦于以下问题:Python CostControl.wait_to_be_displayed方法的具体用法?Python CostControl.wait_to_be_displayed怎么用?Python CostControl.wait_to_be_displayed使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gaiatest.apps.cost_control.app.CostControl
的用法示例。
在下文中一共展示了CostControl.wait_to_be_displayed方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cost_control_data_alert_mobile
# 需要导入模块: from gaiatest.apps.cost_control.app import CostControl [as 别名]
# 或者: from gaiatest.apps.cost_control.app.CostControl import wait_to_be_displayed [as 别名]
def test_cost_control_data_alert_mobile(self):
"""https://moztrap.mozilla.org/manage/case/8938/"""
cost_control = CostControl(self.marionette)
cost_control.launch()
cost_control.switch_to_ftu()
cost_control.run_ftu_accepting_defaults()
self.assertTrue(cost_control.is_mobile_data_tracking_on)
self.assertFalse(cost_control.is_wifi_data_tracking_on)
settings = cost_control.tap_settings()
settings.enable_data_alert_switch()
settings.reset_mobile_usage()
settings.select_when_use_is_above_unit_and_value(u'MB', '0.1')
settings.tap_done()
self.assertTrue(cost_control.is_mobile_data_tracking_on)
# open browser to get some data downloaded
search = Search(self.marionette)
search.launch(launch_timeout=30000)
search.go_to_url('http://mozqa.com/qa-testcase-data/Images/sample_png_02.png')
system = System(self.marionette)
# We could have waited on the page to be loaded, but the toaster can appear before
# the end of the load. That's why the timeout is expanded, the webpage loaded just above
# might take longer.
system.wait_for_notification_toaster_displayed(timeout=180)
system.wait_for_notification_toaster_not_displayed()
utility_tray = system.open_utility_tray()
utility_tray.wait_for_notification_container_displayed()
cost_control_widget = utility_tray.cost_control_widget
cost_control_widget.wait_for_limit_to_be_reached()
cost_control_widget.tap()
cost_control.wait_to_be_displayed()