Пример #1
0
class LoginOutPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div[2]/div[2]/div[4]/span/div/div/a/span[2]"
        ).click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div[2]/div[2]/div[4]/span/div/div[2]/ul/span[2]/li/span"
        ).click()
Пример #2
0
class LoginPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 输入用户名
    def send_username(self, username):
        return self.bp.find_xpath("//input[@type='text']").send_keys(username)

    # 输入密码
    def send_password(self, password):
        return self.bp.find_xpath("//input[@type='password']").send_keys(
            password)

    # 点击登录按钮
    def click_button(self):
        return self.bp.find_xpath("//button[@type='button']").click()
class AddPackageTypePage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入基础类型设置
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/div").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/ul/a/li").click()

    # 新增套餐类型
    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[3]").click()

    def click05(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send01(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click06(self):
        return self.bp.find_xpath(
            "//div[6]/div[2]/div/div/div[3]/div/button[2]").click()
Пример #4
0
class AddPermissionGroupPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入管理员设置
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[6]/div/span").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[6]/ul/a/li/span").click()

    # 添加权限组
    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[3]").click()

    def click05(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send01(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click06(self):
        return self.bp.find_xpath(
            "//div[6]/div[2]/div/div/div[3]/div/button[2]").click()
class AddVipMemberPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入收银界面
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div[2]/div/div/div/div[2]/div/div/a/div/div/div/div"
        ).click()

    # 添加会员
    def click03(self):
        return self.bp.find_xpath("(//button[@type='button'])[3]").click()

    def click04(self):
        return self.bp.find_xpath("(//input[@type='text'])[4]").click()

    def send05(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[4]").send_keys(
            value)

    def click06(self):
        return self.bp.find_xpath("(//input[@type='text'])[5]").click()

    def send07(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[5]").send_keys(
            value)

    def click08(self):
        return self.bp.find_xpath("(//input[@type='text'])[6]").click()

    def send09(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[6]").send_keys(
            value)

    def click10(self):
        return self.bp.find_xpath("(//button[@type='button'])[15]").click()
Пример #6
0
class ChangePwdPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div[2]/div[2]/div[4]/span/div/div/a/span[2]"
        ).click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div[2]/div[2]/div[4]/span/div/div[2]/ul/span/li/span"
        ).click()

    def send01(self, pwd01):
        return self.bp.find_xpath("//input[@type='password']").send_keys(pwd01)

    def send02(self, pwd02):
        return self.bp.find_xpath("(//input[@type='password'])[2]").send_keys(
            pwd02)

    def send03(self, pwd03):
        return self.bp.find_xpath("(//input[@type='password'])[3]").send_keys(
            pwd03)

    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[4]").click()
Пример #7
0
class AddVipCardPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入会员卡管理
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/div").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/ul/a[4]/li/span").click()

    # 添加会员卡
    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[3]").click()

    def click05(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def send06(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[2]").send_keys(
            value)

    def click07(self):
        return self.bp.find_xpath("(//input[@type='text'])[3]").click()

    def send08(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[3]").send_keys(
            value)

    def click09(self):
        return self.bp.find_xpath(
            "//div[7]/div[2]/div/div/div[3]/div/button[2]").click()
class AddManagerPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入管理员设置
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[6]/div/span").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[6]/ul/a/li/span").click()

    # 添加管理员
    def click04(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div[2]/div/div/div/div/div/div/div/div/div/div/div[3]"
        ).click()

    def click05(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def send06(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[2]").send_keys(
            value)

    def click07(self):
        return self.bp.find_xpath("(//input[@type='password'])[4]").click()

    def send08(self, value):
        return self.bp.find_xpath("(//input[@type='password'])[4]").send_keys(
            value)

    def click09(self):
        return self.bp.find_xpath("(//input[@type='text'])[3]").click()

    def send10(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[3]").send_keys(
            value)

    def click11(self):
        return self.bp.find_xpath("//form/div[5]/div/div/div/span").click()

    def click12(self):
        return self.bp.find_xpath("//div[7]/ul[2]/li").click()

    def click13(self):
        return self.bp.find_xpath("//div[6]/div/div/div/span").click()

    def click14(self):
        return self.bp.find_xpath("//div[8]/ul[2]/li").click()

    def click15(self):
        return self.bp.find_xpath(
            "//div[9]/div[2]/div/div/div[3]/div/button[2]").click()
class SinglePaymentChoseEmployeesPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 单个服务项目,多个员工,支付
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/a/li/span").click()

    # 选择服务项目
    def click03(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def click04(self):
        return self.bp.find_xpath("//span/form/div/div/div/label").click()

    # 选择多个服务员工
    def click05(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def click06(self):
        return self.bp.find_xpath(
            "//div[10]/div/span/form/div/div/div/label").click()

    def click07(self):
        return self.bp.find_xpath("(//button[@type='button'])[7]").click()

    def click08(self):
        return self.bp.find_xpath("(//input[@type='text'])[3]").click()

    def click09(self):
        return self.bp.find_xpath(
            "//div[13]/div/span/form/div/div/div/label[2]").click()

    def click10(self):
        return self.bp.find_xpath("(//button[@type='button'])[7]").click()

    def click11(self):
        return self.bp.find_xpath("(//input[@type='text'])[4]").click()

    def click12(self):
        return self.bp.find_xpath(
            "//div[15]/div/span/form/div[2]/div/div/label").click()

    # 结算
    def click13(self):
        return self.bp.find_xpath("//div[6]/div/button").click()

    def click14(self):
        return self.bp.find_xpath(
            "//div[2]/div/div/div/div/div[3]/button[2]").click()

    def click15(self):
        return self.bp.find_xpath("//div[16]/button").click()

    def click16(self):
        return self.bp.find_xpath("(//button[@type='button'])[21]").click()
Пример #10
0
class AddPackagePage:

    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入基础类型设置
    def click01(self):
        return self.bp.find_xpath("//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath("//div[@id='app']/div/div/div/ul/li[2]/div").click()

    def click03(self):
        return self.bp.find_xpath("//div[@id='app']/div/div/div/ul/li[2]/ul/a[3]/li").click()

    # 新增套餐
    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[3]").click()

    def click05(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send06(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click07(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def send08(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[2]").send_keys(value)

    def click09(self):
        return self.bp.find_xpath("//div[3]/div/div/div/span").click()

    def click10(self):
        return self.bp.find_xpath("//li/li").click()

    def click11(self):
        return self.bp.find_xpath("//div[4]/div/div/div/div/i").click()

    def click12(self):
        return self.bp.find_xpath("//span[5]/em").click()

    def click13(self):
        return self.bp.find_xpath("//div[5]/div/div/div/div/i").click()

    def click14(self):
        return self.bp.find_xpath("//div[5]/div/div/div[2]/div/div/div[2]/div/span[5]/em").click()

    def click15(self):
        return self.bp.find_xpath("//div[10]/label").click()

    def click16(self):
        return self.bp.find_xpath("//td/div/div/button").click()

    def click17(self):
        return self.bp.find_xpath("//span/ul/li").click()

    def click18(self):
        return self.bp.find_xpath("//div/div/label/span/input").click()

    def click19(self):
        return self.bp.find_xpath("//div[7]/div[2]/div/div/div[3]/div/button[2]").click()
Пример #11
0
class VipSinglePaymentPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 会员购买项目
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/a/li/span").click()

    def click03(self):
        return self.bp.find_xpath("(//input[@type='radio'])[2]").click()

    def click04(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send05(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click06(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div[2]/div/div/div/div/div/div/div/div/div[2]/div[2]/ul[2]/li/div/div[2]"
        ).click()

    # 选择单个项目
    def click07(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def click08(self):
        return self.bp.find_xpath("//span/form/div/div/div/label").click()

    def click09(self):
        return self.bp.find_xpath("(//input[@type='text'])[3]").click()

    def click10(self):
        return self.bp.find_xpath(
            "//div[13]/div/span/form/div/div/div/label").click()

    def click11(self):
        return self.bp.find_xpath("(//button[@type='button'])[10]").click()

    def click12(self):
        return self.bp.find_xpath("(//button[@type='button'])[20]").click()

    def click13(self):
        return self.bp.find_xpath("(//button[@type='button'])[17]").click()

    def click14(self):
        return self.bp.find_xpath("(//button[@type='button'])[21]").click()

    # 结算
    def click16(self):
        return self.bp.find_xpath("//div[6]/div/button").click()

    def click17(self):
        return self.bp.find_xpath(
            "//div[2]/div/div/div/div/div[3]/button[2]").click()

    def click18(self):
        return self.bp.find_xpath("//div[16]/button").click()

    def click19(self):
        return self.bp.find_xpath("(//button[@type='button'])[21]").click()
class AddEmployeePage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入员工界面
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[5]/div").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[5]/ul/a/li").click()

    # 新增套餐类型
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().send_keys(a[0])
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath("(//input[@type='text'])[3]").send_keys(a[1])
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath("(//input[@type='text'])[4]").send_keys(a[2])
    driver.find_element_by_xpath().click()
    driver.find_element_by_xpath("(//input[@type='text'])[6]").send_keys(a[3])
    driver.find_element_by_xpath("(//input[@type='text'])[7]").click()
    driver.find_element_by_xpath("(//input[@type='text'])[7]").send_keys(a[4])
    driver.find_element_by_xpath("(//input[@type='text'])[8]").click()
    driver.find_element_by_xpath("(//input[@type='text'])[8]").send_keys(a[5])
    driver.find_element_by_xpath().click()

    def click04(self):
        return self.bp.find_xpath("(//button[@type='button'])[4]").click()

    def click05(self):
        return self.bp.find_xpath("(//input[@type='text'])[2]").click()

    def send06(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[2]").send_keys(
            value)

    def click07(self):
        return self.bp.find_xpath("//div[3]/div/div/div/span").click()

    def click08(self):
        return self.bp.find_xpath("//span/li[3]").click()

    def click09(self):
        return self.bp.find_xpath("//div[4]/div/div/div/span").click()

    def click10(self):
        return self.bp.find_xpath("//div[4]/div/div/div[2]/ul[2]/li").click()

    def click11(self):
        return self.bp.find_xpath("(//input[@type='text'])[3]").click()

    def send12(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[3]").send_keys(
            value)

    def click13(self):
        return self.bp.find_xpath("(//input[@type='text'])[4]").click()

    def send14(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[4]").send_keys(
            value)

    def click15(self):
        return self.bp.find_xpath("(//input[@type='text'])[6]").click()

    def send16(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[6]").send_keys(
            value)

    def click17(self):
        return self.bp.find_xpath("(//input[@type='text'])[7]").click()

    def send18(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[7]").send_keys(
            value)

    def click19(self):
        return self.bp.find_xpath("(//input[@type='text'])[8]").click()

    def send20(self, value):
        return self.bp.find_xpath("(//input[@type='text'])[8]").send_keys(
            value)

    def click21(self):
        return self.bp.find_xpath(
            "(//div[8]/div[2]/div/div/div[3]/div/button[2])").click()
class AddServiceProjectPage:
    def __init__(self, driver):
        self.bp = BasePage(driver)

    # 进入服务项目界面
    def click01(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div[2]/div/div/ul/div/a[3]/li").click()

    def click02(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/div").click()

    def click03(self):
        return self.bp.find_xpath(
            "//div[@id='app']/div/div/div/ul/li[2]/ul/a[2]/li/span").click()

    # 新增服务项目
    def click04(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def click05(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send06(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click07(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def click08(self):
        return self.bp.find_xpath("//input[@type='text']").click()

    def send09(self, value):
        return self.bp.find_xpath("//input[@type='text']").send_keys(value)

    def click10(self):
        return self.bp.find_xpath("//div[3]/div/div/div/span").click()

    def click11(self):
        return self.bp.find_xpath("//li/li").click()

    def click12(self):
        return self.bp.find_xpath("(//input[@type='checkbox'])[12]").click()

    def click13(self):
        return self.bp.find_xpath(
            "//div[6]/div[2]/div/div/div[3]/div/button[2]").click()