def dmz_menu(self): driver = self.driver driver.implicitly_wait(10) try: public_control.menu(self,u"网络",u"DMZ") except (NoSuchElementException,Exception) as e: print u"页面跳转到DMZ失败,原因如下:%s" % e
def diag_menu(self): driver = self.driver driver.implicitly_wait(10) try: public_control.menu(self,u"网络",u"网络诊断") except (NoSuchElementException,Exception) as e: print u"网络诊断页面跳转失败,原因如下:%s" %str(e)
def flashops_menu(self): driver = self.driver driver.implicitly_wait(10) try: public_control.menu(self,u"系统",u"备份/升级") except (NoSuchElementException,Exception) as e: print u"页面跳转到DMZ失败,原因如下:%s" % e
def test_qosIP_reboot(self): u'''验证qos-ip重启后规则有效性 ''' driver = self.driver qosIP_control.set_qos_ip_enable(self) #添加规则 qosIP_business.set_rule(self,startIP,endIP,dlSpeed,upSpeed,1) #重启 public_control.menu(self,u'系统',u'重启') reboot_control.reboot(self) time.sleep(60) driver.implicitly_wait(10) dl = qosIP_business.dlSpeedCheck(self,dlSpeed,err) assert dl, u"重启后在线测试下载速度与设置的下载速度超过误差" print u"qos-ip重启后规则有效性检查--用例编号100msh0256--测试成功"
def test_rebootLoop(self): for i in range(1,6): for j in range(0,20): self.driver.get(url) login_control.set_user(self,user,pwd) login_control.submit(self) reboot_control.menu(self) reboot_control.reboot(self) self.driver.implicitly_wait(50) login_control.set_user(self,user,pwd) login_control.submit(self) public_control.menu(self,u'网络',u'门户认证') result1 = network_control.network(self,"http://www.sina.com.cn",u"新浪") assert result1==True, u'第%d次反复重启20次后门户认证失败,程序中断' %i print u'第%d次反复重启20次后门户认证生效' %i result2 =privoxy_control.get_js(self) assert 'http://chdadd.100msh.com/ad.js' in result2,u'第%d次反复重启20次后如影随行功能不生效' %i
def menu(self): public_control.menu(self,u'网络',u'Qos-ip') '''
def interface_menu(self): public_control.menu(self, u"网络", u"接口")
def menu(self): public_control.menu(self,u'系统',u'管理权') '''
def wifidog_menu(self): public_control.menu(self,u"网络",u"门户认证")
def dhcpdns_menu(self): public_control.menu(self,u"网络",u"DHCP/DNS")