Пример #1
0
 def test_003_delAccNumber(self):
     u'''认证账号 - 删除'''
     nodata = getAssertText('nodata')
     login.loginWeb(self)  # admin账号登录
     self.driver.implicitly_wait(10)
     pppoeauth = Organization_userAuthPage(self.driver, self.url)
     # 打开用户管理 - 用户认证
     pppoeauth.click_UserManage()
     time.sleep(0.5)
     pppoeauth.click_userAuth()
     time.sleep(1)
     pppoeauth.click_account()
     time.sleep(1)
     pppoeauth.click_selAll()
     time.sleep(0.5)
     pppoeauth.click_deleteAll()
     time.sleep(1)
     pppoeauth.click_ok()
     time.sleep(1)
     list_tips=pppoeauth.getText_byXpath(pppoeauth.list_tips)
     self.assertEqual(str(list_tips),nodata,msg='账号删除失败')
     print('认证账号 - 账号删除 验证通过')
     self.driver.quit()
     organization_group.group_delete(self)  # 删除组
     logger.info('test_003_delAccNumber passed')
Пример #2
0
    def test_002_MovetoOther(self):
        u'''用户 :移动到其他组'''
        organization_group.import_empty_template(self)  # 判断是否有组织架构,有则清空

        #新建组
        organization_group.group_add(self)

        #切回用户状态列表
        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        status = Organization_userStatusPage(self.driver, self.url)
        # 打开用户管理 - 组织成员
        status.click_UserManage()
        time.sleep(0.5)
        status.click_userstatus()
        time.sleep(1)
        # 将页面刷新按钮改成“手动”
        sel = status.selelement_byXpath(status.selmanual)
        Select(sel).select_by_value('manual')
        time.sleep(1)
        status.click_refreshtable()
        time.sleep(1)
        #移动 列表中第一个 到 新建组'SelfComputerTest' 中
        #获取列表中第一个被移动的用户的IP
        list_IP1 = str(status.getText_byXpath(status.list_IP1))
        status.click_checkbox1()
        time.sleep(0.5)
        status.click_move()
        time.sleep(1)
        status.click_save()
        time.sleep(2)
        # 断言
        group = OrganizationMembersPage(self.driver, self.url)
        group.click_userGroup()
        time.sleep(1)
        group.click_list_groupName_c()
        time.sleep(2)
        listIP = str(group.getText_byXpath(group.listAddIP))
        self.assertEqual(listIP, list_IP1, msg='移动出错 IP不一致')
        authgroup = str(group.getText_byXpath(group.list_authgroup2))
        self.assertEqual(authgroup, 'SelfComputerTest', msg='移动出错 所属组 不一致')
        self.driver.quit()
        print('移动到其他组 验证成功')

        # 删除新建组'SelfComputerTest',使在线用户回到临时用户组
        time.sleep(1)
        organization_group.group_delete(self)
        logger.info('test_002_MovetoOther passed')
Пример #3
0
    def tearDown(self):
        nodata = getAssertText('nodata')
        # 关闭防火墙,删除禁止策略
        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        firewall = AccessControlPage(self.driver, self.url)
        firewall.click_FireWall()
        time.sleep(0.5)
        firewall.click_AccessControl()
        time.sleep(1)
        firewall.click_checkTraffic()
        time.sleep(1)
        checkTrafficS = firewall.getAttribute_byId(
            firewall.checkTrafficS, 'checktype')  # checktype 0未开启,1开启
        self.assertEqual(checkTrafficS, '0', msg='访问控制 未关闭')
        print('访问控制策略 已关闭')
        firewall.click_delete()
        time.sleep(1)
        firewall.click_ok()
        time.sleep(1)
        # 断言
        listnodata = str(firewall.getText_byXpath(firewall.listnodata))
        self.assertEqual(listnodata, nodata, msg='策略删除失败')
        print('策略已删除')
        # 删除时间计划
        timePlan = timePlanPage(self.driver, self.url)
        timePlan.click_sysObj()
        time.sleep(0.5)
        timePlan.click_timePlan()
        time.sleep(1)
        timePlan.click_delete()
        time.sleep(1)
        timePlan.click_ok()
        time.sleep(1)
        # 断言
        listtips2 = str(timePlan.getText_byXpath(timePlan.listnodata))
        self.assertEqual(listtips2, nodata, msg='时间计划删除失败')
        print('时间计划已删除')
        self.driver.quit()
        # 删除组织架构
        organization_group.group_delete(self)
        print('组织架构 已删除')

        logger.info('tearDown over')
        logger.info('%s' % ('=' * 50))
Пример #4
0
    def test_002_usergroup(self):
        u'''内网访问控制 - 组织架构'''
        self.driver.quit()
        RouteUrl = getweb('RouteUrl')
        #增加组织架构用户
        organization_group.import_empty_template(self)
        organization_group.add_user(self)

        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        accesscontrol = ManagementPolicyPage(self.driver, self.url)
        # 进入系统配置-网管策略-内网访问控制
        accesscontrol.click_sysConfig()
        time.sleep(0.5)
        accesscontrol.click_ManagementPolicy()
        time.sleep(1)
        accesscontrol.click_lanAccessControl()
        time.sleep(1)
        accesscontrol.click_choosePeople()
        time.sleep(1)
        accesscontrol.click_usergroup()
        #组织架构,这里选择的是ROOT 所有
        time.sleep(1)
        accesscontrol.click_Root()
        #弹窗中的保存
        accesscontrol.click_saveW1()
        time.sleep(1)
        accesscontrol.click_innerAccessControlEn()
        accesscontrol.click_save()
        time.sleep(1)
        self.driver.quit()

        # 调用bat脚本 地址修改为非组织架构IP 192.168.1.39 网关192.168.1.1
        if '192.168.1.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_1duan.bat'))
        elif '192.168.16.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_16duan.bat'))
        else:
            raise Exception('lan口非 1网段、16网段')
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr1 = socket.gethostbyname(socket.getfqdn(socket.gethostname()))
            print(pcaddr1, n)
            if str(pcaddr1) != batSameIP:
                time.sleep(2)
                n += 1
            else:
                print('地址已修改为非绑定地址 192.168.1.39', n)
                break
        else:
            raise Exception('地址修改为非绑定地址 192.168.1.39失败')

        # 判断登录 切换IP后应该不能登录设备
        self.driver = webdriver.Chrome()
        # self.driver.maximize_window()
        self.driver.implicitly_wait(10)
        self.driver.get(RouteUrl)
        title=self.driver.title
        if 'Error: Forbidden' in title:
            print('非组织架构用户无法登录设备 验证通过')
        else:
            CapPic(self.driver)
            logger.info('非组织架构用户依旧可以登录设备')
            raise Exception('非组织架构用户依旧可以登录设备')
        self.driver.quit()

        # 将IP改回自动获取(设置dns为自动获取)
        # 调用bat脚本
        os.system('%s' % (batpath + 'changeDhcpIp.bat'))
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr = socket.gethostbyname(socket.getfqdn(socket.gethostname()))
            print(pcaddr, n)
            if '192.168.' not in str(pcaddr):
                time.sleep(2)
                n += 1
            else:
                print('IP地址已自动获取成功', n)
                break
        else:
            raise Exception('未获取到地址')

        # 验证是否可以登录 并删除添加的组织架构
        #先关闭访问控制 否则删除组织架构后 无法登录
        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        accesscontrol = ManagementPolicyPage(self.driver, self.url)
        # 进入系统配置-网管策略-内网访问控制
        accesscontrol.click_sysConfig()
        time.sleep(0.5)
        accesscontrol.click_ManagementPolicy()
        time.sleep(1)
        accesscontrol.click_lanAccessControl()
        time.sleep(1)
        accesscontrol.click_innerAccessControlC()
        accesscontrol.click_save()
        time.sleep(1)
        self.driver.quit()
        #删除添加的组织架构
        organization_group.group_delete(self)
        print('访问控制 选择组织架构  验证通过')
        logger.info('test_002_usergroup passed')
    def test_006_binding(self):
        u'''启用ip/mac绑定生效;删除组织架构中的成员,查看绑定是否生效(是否可上网)'''
        host = gettelnet('host')
        # 判断联网 ,不能上网则报错
        p = pingTestIP('www.163.com')
        if p == 'N':
            raise Exception('connect failed.')

        # # 获取本机ip 默认有线地址,有线断开会显示无线
        # pcaddr = socket.gethostbyname(socket.getfqdn(socket.gethostname()))

        # 调用bat脚本 地址修改为非绑定地址 192.168.1.39 网关192.168.1.1
        if '192.168.1.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_1duan.bat'))
        elif '192.168.16.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_16duan.bat'))
        else:
            raise Exception('lan口非 1网段、16网段')
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr1 = socket.gethostbyname(socket.getfqdn(
                socket.gethostname()))
            print(pcaddr1, n)
            if str(pcaddr1) != batSameIP:
                time.sleep(2)
                n += 1
            else:
                print('地址已修改为非绑定地址 192.168.1.39', n)
                break
        else:
            raise Exception('地址修改为非绑定地址 192.168.1.39失败')

        # 判断联网 ,切换非绑定IP后应该不能上网
        time.sleep(5)
        pingTestIP('114.114.114.114')
        pingTestIP('www.baidu.com')
        time.sleep(2)
        p = pingTestIP('www.baidu.com')
        if p == 'Y':
            logger.info('非绑定IP 依旧可以上网')
            logger.info(u'pc当前mac为:%s' % pcaddr1)
            raise Exception('非绑定IP 依旧可以上网')

        # 将IP改回自动获取(设置dns为自动获取)
        # 调用bat脚本
        os.system(('%s' % batpath + 'changeDhcpIp.bat'))
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr1 = socket.gethostbyname(socket.getfqdn(
                socket.gethostname()))
            print(pcaddr1, n)
            if '192.168.' not in str(pcaddr1):
                time.sleep(2)
                n += 1
            else:
                print('IP地址已自动获取成功', n)
                break
        else:
            raise Exception('未获取到地址')

        #删除绑定绑定 清空组
        organization_group.group_delete(self)

        # 调用bat脚本 地址修改为非绑定地址 192.168.1.39 网关192.168.1.1
        if '192.168.1.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_1duan.bat'))
        elif '192.168.16.1' in host:
            os.system(('%s' % batpath + 'changeStaticIP2_16duan.bat'))
        else:
            raise Exception('lan口非 1网段、16网段')
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr1 = socket.gethostbyname(socket.getfqdn(
                socket.gethostname()))
            print(pcaddr1, n)
            if str(pcaddr1) != batSameIP:
                time.sleep(2)
                n += 1
            else:
                print('地址已修改为非绑定地址 192.168.1.39', n)
                break
        else:
            raise Exception('地址修改为非绑定地址 192.168.1.39失败')

        # 判断联网 ,删除绑定后 切换非绑定IP后应该能上网
        time.sleep(3)
        p = pingTestIP('www.163.com')
        if p == 'N':
            raise Exception('connect failed.')

        # 将IP改回自动获取(设置dns为自动获取)
        # 调用bat脚本
        os.system(('%s' % batpath + 'changeDhcpIp.bat'))
        time.sleep(5)
        n = 0
        while n < 30:
            # 获取本机ip 默认有线地址,有线断开会显示无线
            pcaddr1 = socket.gethostbyname(socket.getfqdn(
                socket.gethostname()))
            print(pcaddr1, n)
            if '192.168.' not in str(pcaddr1):
                time.sleep(2)
                n += 1
            else:
                print('IP地址已自动获取成功', n)
                break
        else:
            raise Exception('未获取到地址')
        logger.info('test_006_binding passed')
Пример #6
0
 def test_003_groupDelete(self):
     u'''组织架构 - 删除组'''
     organization_group.group_delete(self)  # 删除组
     logger.info('test_003_groupDelete passed')
Пример #7
0
    def test_001_ipsec(self):
        u'''ipsec VPN'''
        vpnRouteLan = getweb('vpnRouteLan')
        host = gettelnet('host')
        StateVPN1 = getAssertText('StateVPN1')
        WillReboottips = getAssertText('WillReboottips')

        #先判断是否可以上网
        p = pingTestIP()
        if p == 'N':
            os.system('%s' % (batpath + 'changeDhcpIp.bat'))
            time.sleep(5)
            n = 0
            while n < 30:
                pcaddr = socket.gethostbyname(
                    socket.getfqdn(socket.gethostname()))
                print(pcaddr, n)
                if '192.168.' not in str(pcaddr):
                    time.sleep(2)
                    n += 1
                else:
                    print('IP地址已自动获取成功', n)
                    break
            else:
                raise Exception('未获取到地址')
            # 删除绑定绑定 清空组
            organization_group.group_delete(self)

        login.loginWeb(self)
        self.driver.implicitly_wait(10)
        ipsec = IPsecPage(self.driver, self.url)
        ipsec.click_VPNConfig()
        time.sleep(0.5)
        ipsec.click_IPSec()
        time.sleep(1)
        # 操作删除 以访已有规则
        ipsec.click_selall()
        time.sleep(0.2)
        ipsec.click_delall()
        time.sleep(2)
        try:
            self.driver.implicitly_wait(2)
            ipsec.find_ok()
        except NoSuchElementException:
            try:
                ipsec.find_tipsshowin()
                time.sleep(1)
            except NoSuchElementException:
                pass
        else:
            time.sleep(1)
            print('ipsec VPN列表为空')

        ipsec.click_add()
        time.sleep(1)
        ipsec.input_ids('test')
        ipsec.input_peer(vpnRouteWan)
        ipsec.input_remoteAddr(vpnRouteLan)
        # ipsec.input_remoteMask('255.255.255.0')
        ipsec.input_preshareKey('12345678')
        ipsec.click_save()
        time.sleep(2)
        try:  #无线设备增加ac功能后 配置第一条ipsec时会提示重启
            ipsec.find_ok()
        except NoSuchElementException:
            pass
        else:
            time.sleep(2)
            tips = str(ipsec.getText_byClass(ipsec.u_tim_str))
            self.assertEqual(tips, WillReboottips, msg='点击提示重启 操作失败')
            # 设备重启时间不一致,做个判断
            time.sleep(30)
            i = 0
            while i < 20:
                now_url = str(self.driver.current_url)
                # print(now_url,i)
                if '/noAuth/login.html' not in now_url:  # 如果不同
                    time.sleep(5)
                else:
                    break
                i += 1
            else:
                raise Exception('设备重启未正常启动')
            self.driver.quit()
            login.loginWeb(self)

        # 从外网配置页面获取WAN1口地址
        wanpage = NetworkConfig_wanpage(self.driver, self.url)
        wanpage.click_NetworkConfig()
        time.sleep(0.5)
        wanpage.click_WANconfig()
        time.sleep(1)

        # 判断联网状态
        i = 0
        while i < 21:
            wanpage.click_refresh()
            time.sleep(1)
            list_conState = wanpage.getText_byXpath(wanpage.connectState1)
            print(str(list_conState), i)
            if str(list_conState) != ConnectState:
                time.sleep(3)
                i += 1
            else:
                break
        else:
            CapPic(self.driver)
            logger.info(u"WAN口未连接")
            raise Exception('WAN1 未连接')
        i = 0
        while i < 21:
            # 判断联网 ,不能上网则报错
            p = pingTestIP('www.baidu.com')
            print(p, i)
            if p == 'N':
                time.sleep(3)
                i += 1
            else:
                break
        else:
            logger.info(u"connect failed")
            raise Exception('connect failed.')

        # WAN1 ip变量赋值,页面读取
        WAN1_ip = str(wanpage.getText_byXpath(wanpage.line1IP))
        # print('WAN1_ip=',WAN1_ip)
        time.sleep(1)
        self.driver.quit()

        # 另外一台路由器 配置ipsec
        i = 0  #以访刚重启wan口还不通
        while i < 60:
            pingTestIP(vpnRouteWan)
            if p == 'N':
                time.sleep(1)
                i += 1
            else:
                break
        else:
            raise Exception(u'无法ping通vpnRoute')
        # time.sleep(5)
        login.test_enableLoginWeb(self, url=vpnRouteUrl)
        ipsec = IPsecPage(self.driver, self.url)
        ipsec.click_VPNConfig()
        time.sleep(0.5)
        ipsec.click_IPSec()
        time.sleep(1)
        # 操作删除 以访已有规则
        ipsec.click_selall()
        time.sleep(0.2)
        ipsec.click_delall()
        time.sleep(1)
        try:
            self.driver.implicitly_wait(2)
            ipsec.find_ok()
        except NoSuchElementException:
            try:
                ipsec.find_tipsshowin()
                time.sleep(1)
            except NoSuchElementException:
                pass
        else:
            time.sleep(1)
            print('ipsec VPN列表为空')

        ipsec.click_add()
        time.sleep(1)
        ipsec.input_ids('test')
        ipsec.input_peer(WAN1_ip)
        ipsec.input_remoteAddr(host)
        # ipsec.input_remoteMask('255.255.255.0')
        ipsec.input_preshareKey('12345678')
        ipsec.click_save()
        time.sleep(2)

        i = 0
        while i < 100:
            ipsec.click_IPSec()
            time.sleep(1)
            list_status = ipsec.getText_byXpath(ipsec.list_status)
            print(list_status)
            if list_status == StateVPN1:
                logger.info(u'ipsec 已建立')
                break
            else:
                time.sleep(3)
                i += 1
        else:
            logger.info(u'ipsec 未建立成功')
            CapPic(self.driver)
            raise Exception(u'ipsec未建立成功')

        self.driver.quit()
        logger.info('test_001_ipsec passed')
Пример #8
0
    def test_003_AuthNotice(self):
        u'''账号到期通告'''
        messages = getAssertText('PPPoENotice')

        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        pppoeauth = Organization_userAuthPage(self.driver, self.url)
        # 打开用户管理 - 用户认证
        pppoeauth.click_UserManage()
        time.sleep(0.5)
        pppoeauth.click_userAuth()
        time.sleep(1)
        pppoeauth.click_account()
        time.sleep(1)
        # 新增已过期账号
        pppoeauth.click_addUser()
        time.sleep(1)
        pppoeauth.input_name('BeOverdue')
        selauthType = pppoeauth.selelement_byName('authType')
        Select(selauthType).select_by_value('PPPoE')
        time.sleep(1)
        pppoeauth.input_authAccount('BeOverdue')
        pppoeauth.input_authPassword('BeOverdue')
        pppoeauth.click_accountBillEn()
        time.sleep(1)
        #设置账号日期
        pppoeauth.click_accountOpenDater()
        pppoeauth.click_bnpreMonth()  #向前一个月
        pppoeauth.click_day1()  #任意选择
        pppoeauth.click_accountStopDate()
        pppoeauth.click_bnpreMonth()  # 向前一个月
        pppoeauth.click_day2()
        pppoeauth.click_save()
        time.sleep(2)
        # 断言 添加的账号 认证方式和认证账号 是否正常(第二行)
        list_authtype2 = pppoeauth.getText_byXpath(pppoeauth.list_authtype2)
        list_authAcc2 = pppoeauth.getText_byXpath(pppoeauth.list_authAcc2)
        self.assertEqual(str(list_authtype2), 'PPPoE', msg='认证方式显示不为“PPPoE”')
        self.assertEqual(str(list_authAcc2),
                         'BeOverdue',
                         msg='认证账号不为“BeOverdue”')
        print('认证账号 - 新增已过期账号 成功')

        # 新增将过期账号
        pppoeauth.click_addUser()
        time.sleep(1)
        pppoeauth.input_name('Overdue')
        selauthType = pppoeauth.selelement_byName('authType')
        Select(selauthType).select_by_value('PPPoE')
        time.sleep(1)
        pppoeauth.input_authAccount('Overdue')
        pppoeauth.input_authPassword('Overdue')
        pppoeauth.click_accountBillEn()
        time.sleep(1)
        # 设置账号日期
        pppoeauth.click_accountOpenDater()
        pppoeauth.click_bnpreMonth()  # 向前一个月
        pppoeauth.click_day1()  # 任意选择
        pppoeauth.click_accountStopDate()
        pppoeauth.click_bnpostMonth()  # 向后一个月
        pppoeauth.click_day3()
        pppoeauth.click_save()
        time.sleep(2)
        # 断言 添加的账号 认证方式和认证账号 是否正常(第三行)
        list_authtype3 = pppoeauth.getText_byXpath(pppoeauth.list_authtype3)
        list_authAcc3 = pppoeauth.getText_byXpath(pppoeauth.list_authAcc3)
        self.assertEqual(str(list_authtype3), 'PPPoE', msg='认证方式显示不为“PPPoE”')
        self.assertEqual(str(list_authAcc3),
                         'Overdue',
                         msg='认证账号不为“BeOverdue”')
        print('认证账号 - 新增将过期账号 成功')
        self.driver.quit()

        #开始验证账号到期通告
        # 已过期账号验证
        #开始拨号
        Adsl.connect(self,
                     name='adsl',
                     username='******',
                     password='******')
        # 通过断言IP地址网段,判断是否可以拨号成功
        pcaddr_connectAdsl = socket.gethostbyname(
            socket.getfqdn(socket.gethostname()))
        # print(pcaddr_connectAdsl)
        self.assertIn('10.10.10.', str(pcaddr_connectAdsl), msg='PPPoE拨号失败')
        time.sleep(2)
        # 打开网页测试,测试上网
        self.driver = webdriver.Chrome()
        # self.driver.maximize_window()
        self.driver.implicitly_wait(10)
        self.driver.get('http://www.utt.com.cn')
        time.sleep(2)
        title1 = self.driver.title
        print(title1)
        self.assertEqual(title1, messages, msg='通告未显示')
        time.sleep(1)
        # 拨号挂断,通过断言IP地址网段,判断是否挂断
        Adsl.disconnect(self)
        pcaddr_disconnectAdsl = socket.gethostbyname(
            socket.getfqdn(socket.gethostname()))
        print(pcaddr_disconnectAdsl)
        self.assertIn('192.168.', str(pcaddr_disconnectAdsl), msg='PPPoE挂断失败')
        self.driver.quit()
        print('已过期账号 到期通告 - 验证成功')

        # 将期账号验证
        # 开始拨号
        Adsl.connect(self, name='adsl', username='******', password='******')
        # 通过断言IP地址网段,判断是否可以拨号成功
        pcaddr_connectAdsl = socket.gethostbyname(
            socket.getfqdn(socket.gethostname()))
        # print(pcaddr_connectAdsl)
        self.assertIn('10.10.10.', str(pcaddr_connectAdsl), msg='PPPoE拨号失败')
        # 打开网页测试,测试上网
        self.driver = webdriver.Chrome()
        # self.driver.maximize_window()
        self.driver.implicitly_wait(10)
        self.driver.get('http://www.utt.com.cn')
        time.sleep(2)
        title1 = self.driver.title
        print(title1)
        self.assertEqual(title1, messages, msg='通告未显示')
        time.sleep(1)
        self.driver.get('http://www.baidu.com')
        time.sleep(2)
        title1 = self.driver.title
        print(title1)
        self.assertEqual(title1, baidutitle, msg='第二次打开网页异常')
        time.sleep(1)
        # 拨号挂断,通过断言IP地址网段,判断是否挂断
        Adsl.disconnect(self)
        pcaddr_disconnectAdsl = socket.gethostbyname(
            socket.getfqdn(socket.gethostname()))
        print(pcaddr_disconnectAdsl)
        self.assertIn('192.168.', str(pcaddr_disconnectAdsl), msg='PPPoE挂断失败')
        self.driver.quit()
        print('将过期账号 到期通告 - 验证成功')

        print('账号到期通告 - 验证成功')
        #删除组织架构组(组内的pppoe账号也会一并删掉)
        organization_group.group_delete(self)

        # 关闭pppoe server
        login.loginWeb(self)  # admin账号登录
        self.driver.implicitly_wait(10)
        pppoeauth = Organization_userAuthPage(self.driver, self.url)
        # 打开用户管理 - 用户认证
        pppoeauth.click_UserManage()
        time.sleep(0.5)
        pppoeauth.click_userAuth()
        time.sleep(1)
        pppoeauth.click_pppoeAuthC()
        time.sleep(1)
        # 断言 开启提示信息是否有误
        status = str(
            pppoeauth.getAttribute_byXpath(pppoeauth.pppoeAuthCs, 'checked'))
        time.sleep(1)
        self.assertEqual(status, 'true', msg='PPPoE认证关闭出错')
        print('PPPoE认证关闭 验证成功')

        self.driver.quit()
        logger.info('test_003_AuthNotice passed')