Beispiel #1
0
 def test_reboot(self):
     self.driver.get(url)
     login_control.set_user(self,user,pwd)
     login_control.submit(self)
     reboot_control.menu(self)
     reboot_control.reboot(self)
     time.sleep(5)
     p = os.system(string)
     assert p !=0 ,u'未进行重启动作'
     print u'正在重启中'
     time.sleep(60)
     p = os.system(string)
     assert p ==0 ,u'页面重启失败'
     print u'页面重启成功'
Beispiel #2
0
 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