Esempio n. 1
0
def redirest_network(self):
    result1 = network_control.ssh_wifidog()
    assert result1, u"wifidog进程没起来,无法进行下一步"
    result2 = network_control.rand_redirect(self)
    assert result2, u"网页认证不成功,无法进行下一步"
    result3 = network_control.rand_network(self)
    assert result3, u"认证后网页访问失败,无法进行下一步"
    data = privoxy_control.get_js(self)
    return data
Esempio n. 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