def check_add_new_policy_success(self, n, name, t): #新增一个policy CPBusiness.add_new_default_policy(self, n, name, t) #获取页面所有标题 result1 = CPControl.get_titlediv(self) self.driver.refresh() self.driver.implicitly_wait(10) #再次获取页面所有标题 result2 = CPControl.get_titlediv(self) if (name in result1) and (name in result2): return True else: return False
def check_portal_rule_expiration(self, n, t): #修改策略的过期时间 CPBusiness.change_portal_rule_expiration(self, n, t) #获取页面所有标题 result = CPControl.get_titlediv(self) if (t + "s") in result: return True else: return False
def check_portal_rule_name(self, n, name): #修改策略的名称 CPBusiness.change_portal_rule_name(self, n, name) #获取页面所有标题 result = CPControl.get_titlediv(self) if name in result: return True else: return False
def check_del_policy_success(self, n, name): #点击页面上强制网络门户 CPControl.CP_menu(self) #点击删除按钮 CPControl.del_button(self, n) CPControl.notice_ok(self) CPControl.apply(self) result = CPControl.get_titlediv(self) if name not in result: return True else: return False