本文整理汇总了Python中OWDTestToolkit.apps.settings.Settings.hotspot方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.hotspot方法的具体用法?Python Settings.hotspot怎么用?Python Settings.hotspot使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.settings.Settings
的用法示例。
在下文中一共展示了Settings.hotspot方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import hotspot [as 别名]
class test_main(GaiaTestCase):
def __init__(self, *args, **kwargs):
kwargs['restart'] = True
super(test_main, self).__init__(*args, **kwargs)
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.settings = Settings(self)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# Open the Settings application.
self.settings.launch()
# Tap hotspot.
self.settings.hotspot()
hotspot_settings = self.UTILS.element.getElement(DOM.Settings.hotspot_settings, "Hotspot settings")
self.UTILS.test.test(hotspot_settings.is_enabled(),
"Hotspot settings are enabled by default (<b>meaning that 'hotspot' is off</b>).")
示例2: test_main
# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import hotspot [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.settings = Settings(self)
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.data_layer.connect_to_wifi()
self.settings.launch()
# Tap hotspot.
self.settings.hotspot()
self.UTILS.reporting.logResult("info", "<b>Check hotspot with WIFI on.</b>")
self.settings.enable_hotspot()
time.sleep(3)
self.settings.disable_hotspot()
self.UTILS.network.disableAllNetworkSettings()
self.apps.kill_all()
time.sleep(2)
self.data_layer.connect_to_cell_data()
self.settings.launch()
self.UTILS.reporting.logResult("info", "<b>Check hotspot with DataConn on.</b>")
time.sleep(2)
self.settings.hotspot()
self.settings.enable_hotspot()
time.sleep(3)
self.settings.disable_hotspot()