本文整理汇总了Python中OWDTestToolkit.apps.settings.Settings.wifi_list_tap_name方法的典型用法代码示例。如果您正苦于以下问题:Python Settings.wifi_list_tap_name方法的具体用法?Python Settings.wifi_list_tap_name怎么用?Python Settings.wifi_list_tap_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OWDTestToolkit.apps.settings.Settings
的用法示例。
在下文中一共展示了Settings.wifi_list_tap_name方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main
# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import wifi_list_tap_name [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.settings = Settings(self)
self.Browser = Browser(self)
self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
self.settings.launch()
self.settings.wifi()
self.settings.connect_to_wifi(self.wifi_name, self.wifi_pass)
network = {'ssid': self.wifi_name}
self.wait_for_condition(lambda m: self.data_layer.is_wifi_connected(network), timeout=30)
self.UTILS.iframe.switchToFrame(*DOM.Settings.frame_locator)
self.settings.wifi_list_tap_name(self.wifi_name)
self.settings.wifi_forget()
self.wait_for_condition(lambda m: not self.data_layer.is_wifi_connected(network), timeout=30)
# make sure we need to add the details again.
self.UTILS.iframe.switchToFrame(*DOM.Settings.frame_locator)
self.settings.wifi_list_tap_name(self.wifi_name)
time.sleep(1)
self.UTILS.element.waitForElements(DOM.Settings.wifi_login_pass, "Password field")
示例2: test_main
# 需要导入模块: from OWDTestToolkit.apps.settings import Settings [as 别名]
# 或者: from OWDTestToolkit.apps.settings.Settings import wifi_list_tap_name [as 别名]
class test_main(GaiaTestCase):
def setUp(self):
# Set up child objects...
GaiaTestCase.setUp(self)
self.UTILS = UTILS(self)
self.settings = Settings(self)
self.Browser = Browser(self)
self.wifi_name = self.UTILS.general.get_config_variable("ssid", "wifi")
self.wifi_pass = self.UTILS.general.get_config_variable("password", "wifi")
def tearDown(self):
self.UTILS.reporting.reportResults()
GaiaTestCase.tearDown(self)
def test_run(self):
# Open the Settings application.
self.settings.launch()
time.sleep(2)
self.settings.wifi()
self.settings.connect_to_wifi(self.wifi_name, self.wifi_pass)
network = {'ssid': self.wifi_name}
self.wait_for_condition(lambda m: self.data_layer.is_wifi_connected(network), timeout=30)
"""
Return to this wifi and check the details, giving some seconds for the
device to get an IP address
"""
time.sleep(10)
self.UTILS.iframe.switchToFrame(*DOM.Settings.frame_locator)
self.settings.wifi_list_tap_name(self.wifi_name)
self.UTILS.element.waitForElements(DOM.Settings.wifi_details_header, "Wifi Details header")
_forget = self.UTILS.element.getElement(DOM.Settings.wifi_details_forget_btn,
"Details for connected wifi - forget button")
_ip = self.UTILS.element.getElement(DOM.Settings.wifi_details_ipaddress,
"Details for connected wifi - ip address")
_link = self.UTILS.element.getElement(DOM.Settings.wifi_details_linkspeed,
"Details for connected wifi - link speed")
_sec = self.UTILS.element.getElement(DOM.Settings.wifi_details_security,
"Details for connected wifi - security")
_signal = self.UTILS.element.getElement(DOM.Settings.wifi_details_signal,
"Details for connected wifi - signal")
screenshot = self.UTILS.debug.screenShotOnErr()
self.UTILS.reporting.logResult("info", "Screenshot: ", screenshot)