Пример #1
0
class HomePage(object):
    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository(
            'PageObjectRepository')
        self.login_iteim = self.paser_page_object.getItemSection(
            'zh_page_home')
        self.wait = WebDriverWait(self.driver, 10, 0.2)

    #定位物业收费
    def open_charge(self):
        locateType, locateExpression = self.login_iteim['page.charge'].split(
            '>')
        charge = getElement(self.driver, locateType, locateExpression)
        return charge

    #定位基础服务
    def open_basic(self):
        locateType, locateExpression = self.login_iteim[
            'page.basic_services'].split('>')
        charge = getElement(self.driver, locateType, locateExpression)
        return charge

    def get_login_name(self):
        locateType, locateExpression = self.login_iteim['page.personal'].split(
            '>')
        time.sleep(1)
        name = getElement(self.driver, locateType, locateExpression).text
        print(name)
        return name
Пример #2
0
class LoginPage(object):

    def __init__(self,driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository('LoginPageRepository1.ini')
        self.login_iteim = self.paser_page_object.getItemSection('zh_login_page')
        print(self.login_iteim)
        self.wait = WebDriverWait(self.driver,10,0.5)

    #定位用户名
    def getUserName(self):
        locateType, locateExpression = self.login_iteim['login_page.username'].split('>')
        usreName = getElement(self.driver,locateType,locateExpression)
        return usreName

    #定位密码
    def getPassword(self):
        locateType, locateExpression = self.login_iteim['login_page.password'].split('>')
        password = getElement(self.driver,locateType,locateExpression)
        return password
    #定位选择框
    def getProjectinput(self):
        locateType,locateExpression = self.login_iteim['login_page.project'].split('>')
        options =  getElement(self.driver,locateType,locateExpression)
        return options

    #选择租户--定位元素中通过contains()筛选元素
    def getProjectvalue(self):
        locateType,locateExpression = self.login_iteim['login_page.options'].split('>')
        options =  getElement(self.driver,locateType,locateExpression)
        return options

    #获取登陆按钮
    def getLoginButton(self):
        locateType,locateExpression = self.login_iteim['login_page.button1'].split('>')
        loginbutton = getElement(self.driver,locateType,locateExpression)
        return loginbutton

    #获取当前选择的租户信息
    def getuserorpassworderror(self):
        time.sleep(5)
        locateType,locateExpression = self.login_iteim['login_page.error'].split('>')
        time.sleep(1)
        loginbutton1 = getElement(self.driver,locateType,locateExpression)
        return loginbutton1

    #判断存在租户
    def gettenant(self):
        liumber = self.driver.find_elements_by_xpath('//li[@role="option"]')
        return liumber
Пример #3
0
class LoginPage(object):
    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository()
        self.login_iteim = self.paser_page_object.getItemSection(
            'qqmail_login')
        print(self.login_iteim)
        self.wait = WebDriverWait(self.driver, 10, 0.2)

    def getFrame(self):
        locateType, locateExpression = self.login_iteim[
            'login_page.frame'].split('>')
        print(locateType, locateExpression)
        frame = getElement(self.driver, locateType, locateExpression)
        return frame

    def getclick(self):
        locateType, locateExpression = self.login_iteim[
            'login_page.click'].split('>')
        print(locateType, locateExpression)
        click = getElement(self.driver, locateType, locateExpression)
        return click

    def getUserName(self):
        locateType, locateExpression = self.login_iteim[
            'login_page.username'].split('>')
        usreName = getElement(self.driver, locateType, locateExpression)
        return usreName

    def getPassword(self):
        locateType, locateExpression = self.login_iteim[
            'login_page.password'].split('>')
        password = getElement(self.driver, locateType, locateExpression)
        return password

    def getLoginButton(self):
        locateType, locateExpression = self.login_iteim[
            'login_page.loginbutton'].split('>')
        loginbutton = getElement(self.driver, locateType, locateExpression)
        return loginbutton

    def login(self):
        self.driver.switch_to.frame(self.getFrame())
        time.sleep(2)
        self.getclick().click()
        self.getUserName().send_keys('3031371046')
        self.getPassword().send_keys('zzz284117')
        self.getLoginButton().click()
        self.driver.switch_to.default_content()  # 切换到最上层
        time.sleep(5)
Пример #4
0
class Addressbook_Page(object):
    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository()
        self.addressbook_iteim = self.paser_page_object.getItemSection(
            'qqmail_homepage')
        print(self.addressbook_iteim)
        self.wait = WebDriverWait(self.driver, 10, 0.2)

    def get_address_book(self):
        locateType, locateExpression = self.addressbook_iteim[
            'get_address_book'].split('>')
        address_book = getElement(self.driver, locateType, locateExpression)
        return address_book

    def getFrame(self):
        locateType, locateExpression = self.addressbook_iteim[
            'getframe'].split('>')
        frame = getElement(self.driver, locateType, locateExpression)
        return frame

    def create_address_book(self):
        locateType, locateExpression = self.addressbook_iteim[
            'create_address_book'].split('>')
        add_button = getElement(self.driver, locateType, locateExpression)
        return add_button

    def create_name_address(self):
        locateType, locateExpression = self.addressbook_iteim[
            'create_name_address'].split('>')
        create_name = getElement(self.driver, locateType, locateExpression)
        return create_name

    def create_email_address(self):
        locateType, locateExpression = self.addressbook_iteim[
            'create_email_addres'].split('>')
        create_email = getElement(self.driver, locateType, locateExpression)
        return create_email

    def create_phone_address(self):
        locateType, locateExpression = self.addressbook_iteim[
            'create_phone_address'].split('>')
        create_phone = getElement(self.driver, locateType, locateExpression)
        return create_phone

    def save_button_address(self):
        locateType, locateExpression = self.addressbook_iteim[
            'save_button_address'].split('>')
        save_button = getElement(self.driver, locateType, locateExpression)
        return save_button

    def out_button_email(self):
        locateType, locateExpression = self.addressbook_iteim[
            'out_button_email'].split('>')
        out_button = getElement(self.driver, locateType, locateExpression)
        return out_button

    def out_button(self):
        locateType, locateExpression = self.addressbook_iteim[
            'out_button'].split('>')
        out_button = getElement(self.driver, locateType, locateExpression)
        return out_button

    def addressbook(self):
        self.get_address_book().click()
        self.driver.switch_to.frame(self.getFrame())
        time.sleep(2)
        self.create_address_book().click()
        self.create_name_address().send_keys('中岛一')
        self.create_email_address().send_keys('*****@*****.**')
        self.create_phone_address().send_keys('18301565568')
        self.save_button_address().click()
Пример #5
0
class Basic_announcement_Page(object):
    '''
    小区公告列表

    '''

    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository('BasicserverRepository.ini')
        self.basic_announcement = self.paser_page_object.getItemSection('Basic_announcement_home')

        info('返回配置的元素定位信息{}'.format(self.basic_announcement))

        self.wait = WebDriverWait(self.driver, 10, 0.5)

    # 小区信息管理
    def Getannouncement_page(self):
        locateType, locateExpression = self.basic_announcement['announcement.page'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

        # 小区公告列表

    def Getannouncement_list(self):
        locateType, locateExpression = self.basic_announcement['announcement.list'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span




        # 筛选标签状态

    def getannouncement_page(self):
        locateType, locateExpression = self.basic_announcement['announcement.page'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

        # 筛选标签状态:温馨提示

    def getannouncement_page_Lableprompt(self):
        h = self.basic_announcement['lableprompt1']
        print(h)
        locateType, locateExpression = h.split('>')
        print('验证信息', locateType, locateExpression)
        span = getElement(self.driver, locateType, locateExpression)
        return span

        # 筛选标签状态:紧急通知

    def getannouncement_page_communitynotice(self):
        locateType, locateExpression = self.basic_announcement['announcement.page.communitynotice'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

        # 筛选标签状态:小区宣传

    def getannouncement_page_communitypropaganda(self):
        locateType, locateExpression = self.basic_announcement['announcement.page.communitypropaganda'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

        # 筛选标签状态:小区活动

    def getannouncement_page_communityactivity(self):
        locateType, locateExpression = self.basic_announcement['announcement.page.communityactivity'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 点击新建公告按钮
    def Add_anouncement_button(self):
        locateType, locateExpression = self.basic_announcement['add_announcement_button'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    # 定位标题
    def add_announcement_inputlable(self):
        locateType, locateExpression = self.basic_announcement['add_announcement_inputlable'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 定位内容输入框
    def add_announcement_div(self):
        locateType, locateExpression = self.basic_announcement['add_announcement_div'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 定位保存按钮
    def save_announcement(self):
        locateType, locateExpression = self.basic_announcement['save_announcement'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 定位发布按钮
    def release_announcement(self):
        locateType, locateExpression = self.basic_announcement['release_announcement'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 定位标签
    def set_lable_announcement(self):
        locateType, locateExpression = self.basic_announcement['set_lable_announcement'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 封面图片
    def add_cover_picture(self):
        locateType, locateExpression = self.basic_announcement['add_announcement_inputcover'].split('>')
        Loadlbutton = getElements(self.driver, locateType, locateExpression)
        return Loadlbutton[0]

    # 添加内容图片
    def add_content_picture(self):
        locateType, locateExpression = self.basic_announcement['add_announcement_inputcover'].split('>')
        Loadlbutton = getElements(self.driver, locateType, locateExpression)
        return Loadlbutton[2]

    # 获取列表内容
    def get_table_announcement(self):
        locateType, locateExpression = self.basic_announcement['announcement_table'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton
Пример #6
0
class Basic_public_Page(object):
    '''
    服务公示列表

     '''

    # 获取配置文件中的元素定位信息
    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository('BasicserverRepository.ini')
        self.basic_announcement = self.paser_page_object.getItemSection('Basic_Of_the_public')
        info('返回配置的元素定位信息{}'.format(self.basic_announcement))
        self.wait = WebDriverWait(self.driver, 10, 0.5)

    # 小区信息管理
    def Get_public_page(self):
        locateType, locateExpression = self.basic_announcement['public.page'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 服务公示列表
    def getpublic_list(self):
        locateType, locateExpression = self.basic_announcement['public.list'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 筛选标签状态:资质公示
    def getpublic_Lableprompt1(self):
        locateType, locateExpression = self.basic_announcement['public_Lableprompt1'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 筛选标签状态:物业服务
    def getpublic_page_ommunitynotice(self):
        locateType, locateExpression = self.basic_announcement['public.page.communitynotice'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 筛选标签状态:收费标准
    def getpublic_page_communitypropaganda(self):
        locateType, locateExpression = self.basic_announcement['public.page.communitypropaganda'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 筛选标签状态:设备运行公示
    def getpublic_page_communityactivity(self):
        locateType, locateExpression = self.basic_announcement['public.page.communityactivity'].split('>')
        span = getElement(self.driver, locateType, locateExpression)
        return span

    # 服务公示添加按钮
    def getadd_public_button(self):
        locateType, locateExpression = self.basic_announcement['add_public_button'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 添加标题
    def add_public_inputlable(self):
        locateType, locateExpression = self.basic_announcement['add_public_inputlable'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 添加发布人
    def add_public_inputissuer(self):
        locateType, locateExpression = self.basic_announcement['add_public_inputissuer'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 定位标签选择
    def set_lable_public(self):
        locateType, locateExpression = self.basic_announcement['set_lable_public'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 定位服务标签按钮
    # 资质公示
    def public_Lableprompt1(self):
        locateType, locateExpression = self.basic_announcement['public_lableprompt1'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 物业服务
    def public_page_communitynotice(self):
        locateType, locateExpression = self.basic_announcement['public.page.communitynotice'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 收费标准
    def public_page_communitypropaganda(self):
        locateType, locateExpression = self.basic_announcement['public.page.communitypropaganda'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

    # 设备运行公示
    def public_page_communityactivity(self):
        locateType, locateExpression = self.basic_announcement['public.page.communityactivity'].split('>')
        button = getElement(self.driver, locateType, locateExpression)
        return button

        # 封面图片

    def add_cover_piblicpicture(self):
        locateType, locateExpression = self.basic_announcement['add_public_inputcover'].split('>')
        Loadlbutton = getElements(self.driver, locateType, locateExpression)
        return Loadlbutton[0]

    # 添加内容图片
    def add_content_publicpicture(self):
        locateType, locateExpression = self.basic_announcement['add_public_inputcover'].split('>')
        Loadlbutton = getElements(self.driver, locateType, locateExpression)
        return Loadlbutton[2]

    # 添加内容
    def add_public_div(self):
        locateType, locateExpression = self.basic_announcement['add_public_div'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 获取列表内容
    def get_public_table(self):
        locateType, locateExpression = self.basic_announcement['public_table'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 定位发布按钮
    def release_public(self):
        locateType, locateExpression = self.basic_announcement['release_public'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 点击预览按钮
    def Preview_button(self):
        locateType, locateExpression = self.basic_announcement['preview_button'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 关闭预览界面
    def close_Preview_button(self):
        locateType, locateExpression = self.basic_announcement['close_preview_button'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 点击保存按钮
    def create_save_public(self):
        locateType, locateExpression = self.basic_announcement['create_save_public'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        # 创建一个显示等待
        wait = WebDriverWait(self.driver, 5, 0.5)
        # 判断被测上传按钮是否处于克点击状态
        wait.until(EC.element_to_be_clickable((locateType, locateExpression)))
        return Loadlbutton

    # 获取表格输入框的元素
    def delete_table_element(self, tr, td):
        info("输入的测试数据:  第{}行   第{}列  ".format(tr, td))
        BSpage = Basic_public_Page(self.driver)
        webtable = Table(BSpage.get_public_table())
        button = webtable.getWebElementInCell(tr, td, 'xpath', "//a[contains(text(),'删除')]")
        return button

    # 点击弹出提示页面上的确认按钮
    def button_delete_determine(self):
        info('选择确认')
        locateType, locateExpression = self.basic_announcement['determine_button'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    # 点击弹出提示页面上的取消按钮
    def button_delete_cancel(self):
        info('选择取消')
        locateType, locateExpression = self.basic_announcement['cancel_button'].split('>')
        Loadlbutton = getElement(self.driver, locateType, locateExpression)
        return Loadlbutton

    '''
    列表页筛选功能
    '''

    # 返回列表页标签筛选框
    def slect_lable_public(self):
        locateType, locateExpression = self.basic_announcement['slect_lable_public'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

    # 定位标签选项(资质公示)
    def selectpublic_Lableprompt1(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_Lableprompt1'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput


        # 定位标签选项(物业服务)

    def selectpublic_page_communitynotice(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_page_communitynotice'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

        # 定位标签选项(收费标准)

    def selectpublic_page_communitypropaganda(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_page_communitypropaganda'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

    # 定位标签选项(设备运行公示)
    def selectpublic_page_communityactivity(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_page_communityactivity'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

    # 定位筛选状态按钮(未发布)
    def selectpublic_type1_loable(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_type1_loable'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

    # 定位筛选状态按钮(已发布)
    def selectpublic_type2_loable(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_type2_loable'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput

    # 定位筛选状态按钮(已删除)
    def selectpublic_type3_loable(self):
        locateType, locateExpression = self.basic_announcement['selectpublic_type3_loable'].split('>')
        divseleinput = getElement(self.driver, locateType, locateExpression)
        return divseleinput
Пример #7
0
class Charge_Page(object):
    def __init__(self, driver):
        self.driver = driver
        self.paser_page_object = ParsePageObjectRepository(
            'ChargePageRepository.ini')
        self.login_iteim = self.paser_page_object.getItemSection(
            'zh_charge_page')
        self.wait = WebDriverWait(self.driver, 10, 0.2)

    #系统设置
    def open_setting(self):
        locateType, locateExpression = self.login_iteim[
            'charge_setting'].split('>')
        setting = getElement(self.driver, locateType, locateExpression)
        return setting

    def open_setting_value(self):
        locateType, locateExpression = self.login_iteim[
            'charge_setting'].split('>')
        setting = getElement(self.driver, locateType, locateExpression)
        return setting.text

    #收费人员管理
    def charge_management(self):
        locateType, locateExpression = self.login_iteim[
            'charge_management'].split('>')
        setting = getElement(self.driver, locateType, locateExpression)
        return setting

    #费管理员设置
    def charge_management_add(self):
        locateType, locateExpression = self.login_iteim[
            'charge_management_add'].split('>')
        managementsetting = getElement(self.driver, locateType,
                                       locateExpression)
        return managementsetting

    #收费员设置
    def charge_managenment_choose(self):
        locateType, locateExpression = self.login_iteim[
            'charge_managenment_choose'].split('>')
        managementsetting = getElement(self.driver, locateType,
                                       locateExpression)
        return managementsetting

    #管理员权限设置
    def charge_management_permissions(self):
        locateType, locateExpression = self.login_iteim[
            'charge_management_permissions'].split('>')
        permissions = getElement(self.driver, locateType, locateExpression)
        return permissions

    #选择择小区(收费管理员)
    def charge_community_select(self, selectcommunity):
        for i in range(4):
            locateType, locateExpression = self.login_iteim[
                'charge_community_select' + str(i + 1)].split('>')
            selectcommunityname = getElement(self.driver, locateType,
                                             locateExpression)
            if selectcommunityname.text == selectcommunity:
                return selectcommunityname

    #添加按钮
    def charge_add_button(self):
        locateType, locateExpression = self.login_iteim[
            'charge_add_button'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #选择分组
    def charge_select_department(self):
        locateType, locateExpression = self.login_iteim[
            'charge_select_department'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #定位员工
    def charge_choose_inputs(self, employees):
        locateType, locateExpression = self.login_iteim[
            'charge_choose_inputs'].split('>')
        locateExpression1 = locateExpression.replace('应用管理员', employees)
        addbutton = getElement(self.driver, locateType, locateExpression1)
        return addbutton

    #确定按钮
    def charge_button(self):
        locateType, locateExpression = self.login_iteim['charge_button'].split(
            '>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #定位列表
    def charge_management_table(self):
        locateType, locateExpression = self.login_iteim['table'].split('>')
        table = getElement(self.driver, locateType, locateExpression)
        return table

    #定位行
    def tr_table_list(self):
        table = self.charge_management_table()
        rows = table.find_elements_by_tag_name('tr')
        return rows

    #获取总列数
    def td_table_list(self, row):
        rows = row.find_elements_by_tag_name('td')
        return rows

    #设置收费员收费标准权限
    def charge_button_yes(self):
        locateType, locateExpression = self.login_iteim[
            'charge_button_yes'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #设置收费员收费标准权限
    def charge_button_no(self):
        locateType, locateExpression = self.login_iteim[
            'charge_button_no'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #修改封账退款权限
    def charge_administrator_permissions(self, employees):
        locateType, locateExpression = self.login_iteim[
            'charge_administrator_permissions'].split('>')
        locateExpression1 = locateExpression.replace('应用管理员', employees)
        addbutton = getElement(self.driver, locateType, locateExpression1)
        return addbutton

    #点击可退按钮
    def charge_permissions_yes(self):
        locateType, locateExpression = self.login_iteim[
            'charge_permissions_yes'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #点击不可退按钮
    def charge_permissions_no(self):
        locateType, locateExpression = self.login_iteim[
            'charge_permissions_no'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #点击确定按钮
    def charge_determine_button1(self):
        locateType, locateExpression = self.login_iteim[
            'charge_permissions_determinebutton'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton

    #删除员工
    def charge_delete_employees(self, employees):
        locateType, locateExpression = self.login_iteim[
            'charge_delete_employees'].split('>')
        locateExpression1 = locateExpression.replace('收费管理2', employees)
        addbutton = getElement(self.driver, locateType, locateExpression1)
        return addbutton

    def charge_determine_button2(self):
        locateType, locateExpression = self.login_iteim[
            'charge_determine_button'].split('>')
        addbutton = getElement(self.driver, locateType, locateExpression)
        return addbutton