"""
    我的客户页面
"""
from selenium.webdriver.common.by import By
from TestDatas import global_datas as gd


class MyClientPageLocs:
    # 属性 - 元素定位
    # 登录用户名
    username_loc = (By.XPATH, '//span[@class="user-name"]')
    # 我的客户 文本
    myClientText_loc = (By.XPATH, '//div[@class="el-main-wrap my-client"]//span[text()="我的客户"]')
    # 新增客户按钮
    addClient_button_loc = (By.XPATH, '//span[text()="新增客户"]')

    # 姓名或手机号输入框
    username_mobile_loc = (By.XPATH, '//*[@placeholder= "姓名或手机号搜索"]')
    # 查询按钮
    query_button_loc = (By.XPATH, '//span[text()="查询"]')
    # 列表 手机号 文本
    mobile = str(gd.client_info["mobile"])
    phone = mobile.replace(mobile[3:7], "****")
    phone_loc = (By.XPATH, '(//span[text()=" {} "])[1]'.format(phone))

    # 新增客户弹框
    # 客户姓名输入框
    customer_name_loc = (By.XPATH, '//*[@placeholder= "请输入客户姓名"]')
    # 手机号输入框
    mobile_loc = (By.XPATH, '//*[@placeholder= "请输入手机号"]')
    # 客户来源下拉框
    source_select_loc = (By.XPATH, '//*[@placeholder= "请选择客户来源"]')
    # 客户来源 选项
    source_loc = (By.XPATH, '//span[text()="客户加微信"]')
    # 二级渠道下拉框
    recommend_select_loc = (By.XPATH, '//*[@placeholder= "请选择二级渠道"]')
    # 二级渠道 选项
    recommend_loc = (By.XPATH, '//span[text()="小红书"]')
    # 上传按钮
    upload_button_loc = (By.XPATH, '//span[text()="上传"]')
    # 上传文件 输入框
    upload_loc = (By.XPATH, '//input[@class="el-upload__input"]')
    # 跟进人输入框
    user_select_loc = (By.XPATH, '//input[@class="el-select__input is-small"]')
    # 跟进人 选项
    user_loc = (By.XPATH, '//span[text()="贺夏星-Alan"]')
    # 备注输入框
    remark_loc = (By.XPATH, '//textarea[@class="el-textarea__inner"]')
    # 保存按钮
    save_button_loc = (By.XPATH, '//span[text()="保存"]')



