def check_reset_confirm(self): #点击系统设置菜单 UpgradeControl.System_menu(self) #点击升级菜单 UpgradeControl.Upgrade_menu(self) #点击重启 UpgradeControl.factory_reset(self) #判断是否会弹出提示框,有则返回True,没有则返回False element = self.driver.find_element_by_xpath( ".//div[@class='modal-footer']//button[@class='btn btn-primary']") result = element.is_displayed() print result return result
def web_factory_reset_backup(self, host): #首先等待3分钟再复位,防止slave ap和master ap还未建立tcp连接时复位导致的问题 time.sleep(180) #点击系统设置菜单 UpgradeControl.System_menu(self) #点击升级菜单 UpgradeControl.Upgrade_menu(self) #点击恢复出厂 UpgradeControl.factory_reset(self) #弹出的提示窗口中,点击确认 UpgradeControl.notice_ok(self) UpgradeBusiness.confirm_AP_reboot_finish(self, host) print "click factory reset in webpage successfully!"
def check_ok_reset_confirm(self, AP_IP): #点击系统设置菜单 UpgradeControl.System_menu(self) #点击升级菜单 UpgradeControl.Upgrade_menu(self) #点击重启 UpgradeControl.factory_reset(self) #点击确定 UpgradeControl.notice_ok(self) time.sleep(30) result1 = UpgradeControl.get_ping(self, AP_IP) time.sleep(200) result2 = UpgradeControl.get_ping(self, AP_IP) return result1, result2
def check_cancel_reset_confirm(self, AP_IP): #点击系统设置菜单 UpgradeControl.System_menu(self) #点击升级菜单 UpgradeControl.Upgrade_menu(self) #点击重启 UpgradeControl.factory_reset(self) #点击取消 UpgradeControl.notice_cancel(self) time.sleep(5) #判断是否会弹出提示框,有则返回True,没有则返回False element = self.driver.find_element_by_xpath( ".//div[@class='modal-footer']//button[@class='btn btn-primary']") result1 = element.is_displayed() result2 = UpgradeControl.get_ping(self, AP_IP) print result1, result2 return result1, result2