def goin_default_wan(self): try: interface_business.goin_default_interface(self) goin_wan(self) #捕捉异常并打印异常信息 except Exception,e: print u"使用默认ip登录wan页面失败,原因如下:\n%s"%e
def goin_default_lan(self): try: interface_business.goin_default_interface(self) #点击LAN上的修改按钮 interface_control.lan_edit(self) #捕捉异常并打印异常信息 except Exception,e: print u"使用默认ip登录wan页面失败,原因如下:\n%s"%e
def step_100msh0076(self): try: ping = wan_network_control.get_ping('www.baidu.com') if ping != 0: #client点击连接网络上网 network_control.redirect(self,"http://www.haosou.com/") time.sleep(10) #使用默认ip登录接口页面 interface_business.goin_default_interface(self) i = 0 #点击WAN口关闭/连接10次 while(i<11): #点击接口页面中wan的关闭/连接 wan_disconnect_connect(self) time.sleep(10) assert ping == 0,u"第'%s'次关闭/连接wan口,client不能够上网,无法进行下一步"%(i+1) i +=1 return ping #捕捉异常并打印异常信息 except Exception,e: print u"WAN口反复关闭的过程失败,原因如下:\n%s"%e
def setUp(self): self.driver = webdriver.Firefox() #将浏览器最大化 self.driver.maximize_window() #使用默认ip登录接口页面 interface_business.goin_default_interface(self)