def check_group1_radius_portal_function(self, NG2_ssid, password, wlan, eth, t, radius_name, radius_password): #7000新建一个网络组,vid设为2,开启dhcp server tmp1 = NGBusiness(self.driver) tmp1.mixed_7000_new_NG() #76xx上新建一个网络组,vid为2 self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) self.driver.refresh() time.sleep(10) tmp3 = SSIDBusiness(self.driver) tmp3.new_vlan_ssid(NG2_ssid, password, "2") #开启ssid1的强制门户认证 tmp3.click_ssid_portal(2) #master ap加入所有的网络组 tmp2 = APSBusiness(self.driver) tmp2.add_master_to_all_NG() #验证默认list:grandstream中的radius认证的有效性 portal_title,redirect_title,again_title,expiration_title = \ CPBusiness.check_radius_portal(self,NG2_ssid,password, wlan,eth,t,radius_name,radius_password) #刷新页面重新登录ap页面 Lg = LoginBusiness(self.driver) Lg.refresh_login_ap() #删除master ap的ssid1 tmp3.del_all_NG() #删除7000新建的网络组 tmp1.mixed_7000_del_NG() return portal_title, redirect_title, again_title, expiration_title
def check_many_group_portal_function(self, group0_ssid, group1_ssid, group2_ssid, password, wlan, eth): result = [] #7000新建两个网络组,开启dhcp server tmp1 = NGBusiness(self.driver) tmp1.mixed_7000_new_many_NG(2) #76xx上新建1个对应的网络组 self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) self.driver.refresh() time.sleep(10) tmp3 = SSIDBusiness(self.driver) tmp3.new_vlan_ssid(group2_ssid, password, "3") #开启三个网络组的强制门户认证 tmp3.click_ssid_portal(1) tmp3.click_ssid_portal(3) #master ap加入所有的网络组 tmp2 = APSBusiness(self.driver) tmp2.add_master_to_all_NG() #使用免认证的规则,访问腾讯首页,判断是否跳转到portal页面 for j in [group0_ssid, group1_ssid, group2_ssid]: result1 = CPBusiness.check_jump_to_No_auth_portal( self, j, password, wlan, eth) result.append(result1) print result return result
def check_slave_ap_group1_portal_function(self, NG2_ssid, password, wlan, eth): #7000新建一个网络组,vid设为2,开启dhcp server tmp1 = NGBusiness(self.driver) tmp1.mixed_7000_new_NG() #76xx上新建一个网络组,vid为2 self.driver.get(data_basic['DUT_web']) self.driver.implicitly_wait(60) self.driver.refresh() time.sleep(10) tmp2 = SSIDBusiness(self.driver) tmp2.new_vlan_ssid(NG2_ssid, password, "2") #开启group1的强制门户认证 tmp2.click_ssid_portal(2) #slave ap加入所有的网络组 tmp3 = APSBusiness(self.driver) tmp3.add_slave_to_all_NG() #使用免认证的规则,访问腾讯首页,判断是否跳转到portal页面 result = CPBusiness.check_jump_to_No_auth_portal( self, NG2_ssid, password, wlan, eth) #刷新页面重新登录ap页面 Lg = LoginBusiness(self.driver) Lg.refresh_login_ap() #删除ssid1 tmp2.del_all_NG() #删除7000新建的网络组 tmp1.mixed_7000_del_NG() print result return result
def check_other_group_STA_open_group0(self, NG2_ssid, password, ssid, wlan, eth): #新建一个ssid1,vid2 tmp1 = SSIDBusiness(self.driver) tmp1.new_vlan_ssid(NG2_ssid, password, "2") #开启ssid1的强制门户认证 tmp1.click_ssid_portal(2) #master ap加入所有的网络组 tmp2 = APSBusiness(self.driver) tmp2.add_master_to_all_NG() #确认STA连接group0,并且不需要认证 #验证是否需要弹出认证 result = CPBusiness.\ check_jump_to_No_auth_portal(self,ssid,password,wlan,eth) print result return result
def check_open_close_captive_portal_No_auth_function( self, ssid, password, wlan, eth): result = [] for i in range(6): #点击group0的强制门户认证 tmp1 = SSIDBusiness(self.driver) tmp1.click_ssid_portal(1) #使用免认证的规则,访问腾讯首页,判断是否跳转到portal页面 result1 = CPBusiness.check_jump_to_No_auth_portal( self, ssid, password, wlan, eth) result.append(result1) #测试完成一遍后,再次登录ap页面,为后续循环测试做好准备 #刷新页面重新登录ap页面 Lg = LoginBusiness(self.driver) Lg.refresh_login_ap() print result return result