Exemple #1
0
def Skill(start, poco,devices):
    """
    1、点击技能按钮
    2、判断所有技能控件
    3、点击所有技能并进行演示
    :return:
    """
    poco = poco
    Skillpos(poco)  # 重置Skillpos脚本
    for item in range(len(poco("Tabs").child())-1):  # 判断当前界面中的角色职业控件元素
        item1 = "item" + str(item)
        poco("SkillTree(Clone)").offspring("Tabs").child(item1).click()
        for item2 in range(len(poco("Skill").child())):  # 判断当前职业的所有技能控件元素
            item21 = "Skill" + str(item2 + 1)
            for i in range(100):  # todo:滑动100次保证不会出错
                Skillpos_1 = poco("SkillTree(Clone)").offspring(str(item21)).child("Bg").get_position()
                if Skillpos_1[1] > 0.88:  # 判断当前技能元素是不是在屏幕以内
                    common.setswipe(1, (451, 586), (451, 287), devices)
                elif Skillpos_1[1] < 0.12:
                    common.setswipe(1, (451, 287), (451, 586), devices)
                else:
                    break
            poco("SkillTree(Clone)").offspring(str(item21)).child("Bg").click()
            if poco("SkillTree(Clone)").offspring("RedPoint").child("Icon").exists():
                poco("LearnButton").click()  # 点击技能学习.
                freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
                if freeze_poco("LearnButton").exists():
                    for i in range(15):
                        freeze_poco("LearnButton").click()
                    if not poco("LearnButton").exists():
                        pass
            else:
                pass
            Skillpng(start, poco,devices)  # 点击视频预览
    return poco("SkillTree(Clone)").offspring("Tabs").child("item2").child("SelectedTextLabel").get_text()  # 返回一个当前角色的二转职业
Exemple #2
0
def butpos(devices, butpos, pos1=0.4, pos2=0.81, high=1330, low=930, lows=482):
    """
把不在屏幕内部的控件滑动到屏幕内,使之可被操作
:param butpos: 控件的坐标值
:param pos1: 希望控件所在屏幕上的最低限
:param pos2: 希望控件所在屏幕上的最上限
:param high: 固定坐标
:param low: 滑动起始或终点位置
:param lows: 滑动起始或终点位置
:return:
    """

    for i in range(10):
        but = butpos.get_position()
        if but[1] < pos1:
            if i < 4 and i > 2:
                common.setswipe(1, [high, low], [high, lows], devices)
            else:
                common.setswipe(1, [high, lows], [high, low], devices)

        elif but[1] > pos2:
            if i < 4 and i > 2:
                common.setswipe(1, [high, lows], [high, low], devices)
            else:
                common.setswipe(1, [high, low], [high, lows], devices)
        else:
            break
Exemple #3
0
def EnterEctype(conut_time,poco,devices): # 进入主线深渊
    """
    1.这是一个主线深渊副本初始化函数
    2.每次都会进入主界面,然后在进入深渊副本
    """
    # InitialGame.Startgame() # 初始化游戏
    poco("Duck").click()  # 进入日常
    for i in range(5):
        posite = poco("DailyActivityDlg(Clone)").offspring("XActivityHandler").offspring("Item110").child("JoinBtn").get_position()
        if posite[1]>0.77:
            common.setswipe(1, (562, 376), (562, 150), devices)
        elif posite[1]<0.17:
            common.setswipe(1, (562, 376), (562, 550), devices)
        else:
            break
    poco("DailyActivityDlg(Clone)").offspring("XActivityHandler").offspring("Item110").child("JoinBtn").click()  # 进入主线副本
    poco("DungeonSelect(Clone)").offspring("Normal").child(texture="ICON-XT-gkzx2").click() # 点击主线
    for i in range(conut_time):
        poco("DungeonSelect(Clone)").offspring("Bg").child("Left").click()
Exemple #4
0
def setting(start, devices):
    poco = common.deviceconnect(devices)
    poco("Avatar").click()
    common.settouch(1, 1140, 540, devices, times=2)
    if poco("SettingDlg(Clone)").exists():  # 打开设置
        uiname = poco("SettingDlg(Clone)").offspring("Bg").offspring(
            "Bg1").child("T").get_text()
        common.printgreen(f"{uiname}  界面打开成功")

        if poco("InfoTab").exists():  # 个人信息
            poco("InfoTab").click()
            poco("PrerogativeBtn").click()
            if poco("PrerogativeFrame(Clone)").offspring("Bg").child(
                    "Bg1").exists():  # 个性展示
                if poco("DebugDlg(Clone)").offspring("Close").exists():
                    poco("DebugDlg(Clone)").offspring("Close").click()
                common.setswipe(1, (335, 260), (335, 576), devices)
                uiname = poco("PrerogativeFrame(Clone)").offspring(
                    "Bg").offspring("Bg1").child("T").get_text()
                common.printgreen(f"{uiname}  界面打开成功")
                if poco("RuleBtn").exists():  # 规则详情
                    poco("RuleBtn").click()
                    if poco("CommonHelpTip(Clone)").exists():  # 个性显示规则
                        uiname = poco("CommonHelpTip(Clone)").child(
                            "Title").get_text()
                        common.printgreen(f"{uiname}  界面打开成功")
                        poco("CommonHelpTip(Clone)").child("Btn").click()
                        if not poco("CommonHelpTip(Clone)").exists():
                            common.printgreen("规则详情界面关闭正常")
                        else:
                            common.printred("规则详情界面关闭异常")
                            common.get_screen_shot(start, time.time(), devices,
                                                   "规则详情界面关闭异常")
                    else:
                        common.printred("个性显示规则界面打开失败")
                        common.get_screen_shot(start, time.time(), devices,
                                               "个性显示规则界面打开失败")
                else:
                    common.printred("规则详情打开异常")
                    common.get_screen_shot(start, time.time(), devices,
                                           "规则详情打开异常")
                if poco("ShopBtn").exists():  # 个性商店
                    poco("ShopBtn").click()
                    uiname = poco("ShopName").get_text()
                    common.printgreen(f"{uiname}  界面打开成功")
                    poco("Close").click()
                    if poco("PrerogativeFrame(Clone)").offspring("Bg").child(
                            "Bg1").exists():
                        common.printgreen("个性商店关闭正常")
                    else:
                        common.printred("个性商店关闭异常")
                        common.get_screen_shot(start, time.time(), devices,
                                               "个性商店关闭异常")
                else:
                    common.printred("个性商店打开失败")
                    common.get_screen_shot(start, time.time(), devices,
                                           "个性商店打开失败")
                for i in range(6):
                    if i == 4:
                        common.setswipe(1, (335, 567), (335, 260), devices)
                        for a in range(20):
                            if poco("PrerogativeFrame(Clone)").offspring(
                                    "PreList").offspring(
                                        "item4").get_position()[1] > 0.9:
                                common.setswipe(1, (335, 567), (335, 260),
                                                devices)
                            else:
                                break
                    item = f"item{i}"
                    if poco("PrerogativeFrame(Clone)").offspring(
                            "PreList").offspring(item).exists():
                        poco("PrerogativeFrame(Clone)").offspring(
                            "PreList").offspring(item).click()
                        uiname = poco("PrerogativeFrame(Clone)").offspring(
                            "PreList").offspring(item).child(
                                "Text").get_text()
                        childuiname = poco("TLabel").get_text()
                        childnumber = poco("PrerogativeFrame(Clone)"
                                           ).offspring("WrapContent").child()
                        if len(childnumber) < 1:
                            common.printred(f"{uiname}的物品数量异常,请查看具体情况")
                        else:
                            common.printgreen(
                                f"按钮{uiname}打开正常,table页签{childuiname}打开正常,子页签一共有{len(childnumber)}个物品"
                            )
                    else:
                        common.printred(f"{uiname}按钮不存在")
                    if i == 5:
                        poco("Close").click()
                        common.printgreen("个性展示功能测试正常")
            else:
                common.printred("个性展示打开失败")
                common.get_screen_shot(start, time.time(), devices, "个性展示打开失败")
            poco("Avatar").click()
            touch([1140, 540], times=2)
            if poco("PersonalCareerBtn").exists():  # 个人生涯
                poco("PersonalCareerBtn").click()
                if poco("DebugDlg(Clone)").offspring("Close").exists():
                    poco("DebugDlg(Clone)").offspring("Close").click()
                time.sleep(3)
                if len(
                        poco("PersonalCareer(Clone)").offspring(
                            "Tabs").child()) == 3:
                    common.printgreen("个人生涯界面存在3个按钮")
                    poco("Tabs").child("item0").click()
                    common.printgreen("角色名称是" + poco("Username").get_text())
                    poco("Tabs").child("item1").click()
                    time.sleep(3)
                    poco("Season").click()
                    poco("PKDetail").click()
                    if poco(text="挑战记录").exists():
                        common.printgreen("挑战记录界面打开成功")
                        poco(texture="l_close_00").click()
                    else:
                        common.printred("挑战记录界面打开失败")
                        common.get_screen_shot(start, time.time(), devices,
                                               "挑战记录界面打开失败")
                    poco("All").click()  # 打开PVP信息全部比赛
                    if poco("Score").exists():
                        score = poco("Score").child("Value").get_text()
                        common.printgreen(f"全部比赛按钮点击正常,获取的当前评分是:{score}")
                    else:
                        common.printred("PVP信息全部比赛打开失败")
                        common.get_screen_shot(start, time.time(), devices,
                                               "PVP信息全部比赛打开失败")
                    time.sleep(3)
                    poco("Tabs").child("item2").click()
                    if poco("Season").exists():
                        uiname = poco("Level").get_text()
                        common.printgreen(f"当前的荣誉等级是{uiname}")
                        poco("Reward").click()
                        childnumber = poco("ScrollView").child()
                        if len(childnumber) > 5:
                            common.printgreen("荣誉等级奖励的条目大于5个")
                            poco(texture="l_close_00").click()
                            poco("Close").click()
                        else:
                            common.printred("荣誉等级奖励的条目小于5个")
                            common.get_screen_shot(start, time.time(), devices,
                                                   "荣誉等级奖励的条目小于5个")
                            poco(texture="l_close_00").click()
                            poco("Close").click()
                    else:
                        common.printred("荣誉奖杯界面打开失败")
                        common.get_screen_shot(start, time.time(), devices,
                                               "荣誉奖杯界面打开失败")
                else:
                    common.printred("个人生涯界面缺少按钮,具体见详图")
                    common.get_screen_shot(start, time.time(), devices,
                                           "个人生涯界面缺少按钮")
            else:
                common.printred("个人生涯按钮不存在")
                common.get_screen_shot(start, time.time(), devices,
                                       "个人生涯按钮不存在")
        else:
            common.printred("个人信息打开失败")
            common.get_screen_shot(start, time.time(), devices, "个人信息打开失败")
        poco("Avatar").click()
        common.settouch(1, 1140, 540, devices, times=2)
        if poco("SettingDlg(Clone)").exists():  # 判断设置界面是否打开
            if poco("OptionTab").exists():  # 系统设置
                poco("OptionTab").click()
                if poco("SettingPanel").exists():
                    poco("SettingDlg(Clone)").offspring("BtnMid").click()
                    common.printgreen("系统设置界面打开正常,设置画质未中")
                else:
                    common.printred("系统设置界面异常")
                    common.get_screen_shot(start, time.time(), devices,
                                           "系统设置界面异常")
            if poco("PushTab").exists():
                poco("PushTab").click()
                if poco("PushPanel").exists():
                    poco("SettingDlg(Clone)").offspring("Scroll1").offspring(
                        "item0").offspring("Checked").click()
                    common.printgreen("推送设置界面打开成功,操作每日领取体力的提醒")
            else:
                common.printred("推送设置界面异常")
                common.get_screen_shot(start, time.time(), devices, "推送设置界面异常")
            if poco("CameraTab").exists():
                poco("CameraTab").click()
                if poco("BattlePanel").exists():
                    poco("SettingDlg(Clone)").offspring("3DFree").child(
                        "Normal").click()
                    common.printgreen("视角设置界面打开成功,切换视角未3D自由视角")
            else:
                common.printred("视角设置界面异常")
                common.get_screen_shot(start, time.time(), devices, "视角设置界面异常")
            if poco("PasswordTab").exists():
                poco("PasswordTab").click()
                if poco("PasswordPanel").exists():
                    poco("SettingDlg(Clone)").offspring("Open").child(
                        "Selected").click()
                    if poco("SettingPanel").exists():
                        poco("TwoLevelPassword(Clone)").offspring(
                            "Close").click()
                        common.printgreen("二级密码界面打开成功,操作回收保护功能,界面打开关闭正常")
                        poco("SettingDlg(Clone)").child("Bg").child(
                            "Close").click()
            else:
                common.printred("二级密码界面异常")
                common.get_screen_shot(start, time.time(), devices, "二级密码界面异常")
                poco("SettingDlg(Clone)").child("Bg").child("Close").click()
    else:
        common.printred("设置界面打开失败!")
    if poco("Open").exists():  # GM小按钮存在
        poco("Avatar").click()
        poco("Close").click()
    return poco("Duck").get_name()  # 返回值


# devises = "127.0.0.1:62001"
# setting(devises)
Exemple #5
0
def horse_after(start, devices):
    """
    1.进入主界面
    2.点击坐骑按钮
    3.依次点击坐骑图标,查看坐骑模型是否正常
    """
    horselist = [1, ]
    poco = common.deviceconnect(devices)
    check_menu("SysEHorse", poco) # 调用函数查看主界面坐骑按钮是否可点击
    poco("NewBtn").child("BtnBg").click() # 打开坐骑列表
    with poco.freeze() as freeze_poco:
        petgrid = freeze_poco("Grid").child()  # 获取目前所有坐骑数量
    for i in range(len(petgrid)//2,len(petgrid)):
        item = "item" + str(i)
        for i in range(20):
            if poco("Grid").child(item).get_position()[1] > 0.9:
                common.setswipe(1, (200, 560), (200, 180), devices)
            elif poco("Grid").child(item).get_position()[1] < 0.12:
                common.setswipe(1, (200, 180), (200, 560), devices)
            else:
                break
        poco("Grid").offspring(item).click()  # 点击坐骑icon
        freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
        if freeze_poco("Btnhave").exists() or freeze_poco("BtnMount").exists(): #判断坐骑打开是否正常是否存在
            petname = freeze_poco("PetName").offspring("Name").get_text() # 获得当前坐骑的名称
            common.printgreen(f"{petname}坐骑查看正常", end=",")
            try:
                snapshotnumber = freeze_poco("PetMainDlg(Clone)").child("Bg").child("Snapshot").child().get_name()
                if snapshotnumber.isnumeric() == True:
                    if any(snapshotnumber != s for s in horselist):  # 判断snapshotnumber是否在horselist中出现过,如果没有
                        common.printgreen(f"坐骑模型配置存在", end=",")
                        horselist.append(snapshotnumber)
                    else:
                        common.printred(f"{petname}模型与之前的重复", end=",")
                        common.get_screen_shot(start, time.time(), devices, "坐骑模型不显示")
                else:
                    common.printred("坐骑模型配置不存在,请详细查看", end=",")
                    common.get_screen_shot(start, time.time(), devices, "坐骑模型不显示")
            except Exception as e:
                print(e)
                common.printred("坐骑模型配置不存在,请详细查看", end=",")
                common.get_screen_shot(start, time.time(), devices, "坐骑模型不显示")

            if freeze_poco("Btnhave").exists():
                poco("Btnhave").click()
                if poco("ItemToolTipDlg(Clone)").child("Bg").offspring("TopFrame").child("Name").exists():
                    common.printgreen("获取界面打开正常")
                    common.settouch(1, 1140, 540, devices, times=2)
                else:
                    common.printgreen("没有相关坐骑信息,请查具体查看该坐骑!")
                    common.get_screen_shot(start, time.time(), devices, "没有获取到该坐骑相关信息")
                    common.settouch(1, 1140, 540, devices, times=2)
            else:
                if freeze_poco("BtnMount").exists():
                    print("坐骑已经获得,没有获取途径")
                else:
                    common.printred("没有相关坐骑信息,请查具体查看该坐骑!")
                    common.get_screen_shot(start, time.time(), devices, "没有获取到该坐骑相关信息")
        else:
            common.printred("没有获取到该坐骑相关信息")
            common.get_screen_shot(start, time.time(), devices, "没有获取到该坐骑相关信息")
        poco("NewBtn").child("BtnBg").click() # 打开坐骑列表
        time.sleep(1)

    return poco("Btnhave").get_name() # 返回值
Exemple #6
0
def Auction(devices):  # 点击交易所按钮
    """
    点击交易所按钮,进入交易所界面
    :param devices:移动设备端口号,用于识别设备
    :return:
    """
    dev = connect_device("android:///" + devices)
    poco = UnityPoco(device=dev)  # 链接设备,并且重置poco
    freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
    freeze_poco("SysCAuction").click()  # 点击交易所
    poco("AuctionDlg(Clone)").offspring("DragonCoin").child("SelectedTextLabel").click()  # 点击龙币交易所
    freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
    if freeze_poco("ailin").exists() and not poco("AuctionDlg(Clone)").offspring("item9").offspring("ItemTpl").offspring("Name").exists():  # 如果选中框没有勾掉,他俩一起点击可以把所有的货物显示出来
        poco("AuctionDlg(Clone)").offspring("ItemLevel").child("Arrow").click()  # 仅显示当前可用
        poco("AuctionDlg(Clone)").offspring("ItemBlock").child("Arrow").click()  # 仅显示有货
    Type = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("1").child("Label").get_position()
    Selected = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("1").offspring("6").child("Selected").child(
        "P").get_position()
    name = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("1").child("Label")
    if Selected[1]-Type[1] < 0.06:  # 判断下拉框状态
        name.click()  # 点击装备
    for item in range(6, 9):
        item1 = str(item)
        poco(f"{item1}").click()
        auction(poco)
    name.click()  # 点击装备用来恢复界面
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("2").child("Label").click()  # todo:点击龙器
    auction(poco)
    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("3").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("3").offspring("Selected").child("P").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("3").child("Label").click()  # todo:点击纹章
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("3").offspring("Selected").child("P").click()
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("3").child("Label").click()  # todo:点击纹章恢复界面
    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("4").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("4").offspring("Selected").child("P").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("4").child("Label").click()  # todo:金属板
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("4").offspring("Selected").child("P").click()
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("4").child("Label").click()  # todo:点击金属板恢复界面
    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("5").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("5").offspring("22").child("Selected").child(
        "P").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("5").child("Label").click()  # todo:点击其他按钮
    A = ["22", "23", "26", "27", "28"]
    for i in A:
        # poco(f"{i}").click()
        if poco(f"{i}").exists():
            for ii in range(10):
                pos = poco(f"{i}").get_position()
                if pos[1] < 0.28:
                    common.setswipe(1, [319, 256], [319, 577], devices)
                elif pos[1] > 0.87:
                    common.setswipe(1, [319, 577], [319, 256], devices)
                else:
                    break
            poco(f"{i}").click()
            for item in range(1):  # 因为apk功能机制问题,所以只选择前10中商品进行抽样测试
                item1 = "item" + str(item)
                if poco("AuctionDlg(Clone)").offspring(item1).offspring("ItemTpl").exists():
                    common.printgreen(poco("AuctionDlg(Clone)").offspring(item1).offspring("ItemTpl").offspring(
                        "Name").get_text() + "   道具显示正常")
                else:
                    pass
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("5").child("Label").click()  # todo:点击恢复其他按钮
    poco("9").click()  # todo:点击菜肴按钮
    for item in range(1):  # 因为apk功能机制问题,所以只选择前10中商品进行抽样测试
        item1 = "item" + str(item)
        if poco("AuctionDlg(Clone)").offspring(item1).exists():
            common.printgreen(poco("AuctionDlg(Clone)").offspring(item1).offspring("ItemTpl").offspring(
                "Name").get_text() + "   道具显示存在")


    poco("AuctionDlg(Clone)").offspring("Crystal").child("SelectedTextLabel").click()  # TODO:点击水晶交易所
    if poco("ailin").exists() and not poco("AuctionDlg(Clone)").offspring("item9").offspring("ItemTpl").offspring("Name").exists():  # 如果选中框没有勾掉,他俩一起点击可以把所有的货物显示出来
        poco("AuctionDlg(Clone)").offspring("ItemLevel").child("Arrow").click()  # 仅显示当前可用
        poco("AuctionDlg(Clone)").offspring("ItemBlock").child("Arrow").click()  # 仅显示有货
    
    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("30").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("30").offspring("31").child("Label").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("30").child("Label").click()  # TODO:点击装备
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("30").offspring("31").child("Label").click()
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("30").child("Label").click()  # TODO:点击恢复装备


    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").offspring("41").child("Label").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").child("Label").click()  # TODO:点击家园
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").offspring("41").child("Label").click()  # 点击作物
    auction(poco)

    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").offspring("42").child("Label").click()  # 点击料理
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("40").child("Label").click()  # TODO:点击恢复家园


    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").offspring("29").child("Label").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").child("Label").click()  # TODO:点击其他
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").offspring("29").child("Label").click()  # 点击活动礼包
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").offspring("51").child("Label").click()  # 点击三件套时装
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").offspring("52").child("Label").click()  # 点击坐骑
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("50").child("Label").click()  # TODO:点击恢复其他

    A = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").child("Label").get_position()
    B = poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").offspring("61").child("Label").get_position()
    if B[1] - A[1] < 0.06:  # 判断下拉框状态
        poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").child("Label").click()  # TODO:点击纹章
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").offspring("61").child("Label").click()  # 点击金属板
    auction(poco)

    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").offspring("62").child("Label")  # 点击属性纹章
    auction(poco)
    poco("AuctionDlg(Clone)").offspring("TypeList").offspring("60").child("Label").click()  # TODO:点击恢复纹章

    poco("AuctionDlg(Clone)").offspring("Sell").child("SelectedTextLabel").click()  # TODO:点击我要出售
    if poco("ailin").exists() and poco("Tip").exists() and poco(texture="l_frame_01").exists():
        common.printgreen(
            poco("AuctionDlg(Clone)").offspring("Sell").child("SelectedTextLabel").get_text() + "   界面显示正确")
        # 以下为出售道具
        if poco("AuctionDlg(Clone)").offspring("item0").child("Icon").exists():
            poco("AuctionDlg(Clone)").offspring("item0").child("Icon").click()
            common.printgreen("准备上架   " + poco("ItemTpl").child("Name").get_text())
            if poco("AuctionBillFrame(Clone)").child("Bg").exists():
                poco("RightButton").click()
                common.printgreen(poco("AuctionDlg(Clone)").offspring("item0").offspring("ItemTpl").offspring(
                    "Name").get_text() + "上架成功---测试完成,准备下架")
        if poco("AuctionDlg(Clone)").offspring("item0").offspring("ItemTpl").offspring("Name").exists():
            poco("AuctionDlg(Clone)").offspring("item0").offspring("ItemTpl").offspring("Name").click()
            if poco("LeftButton").exists():  # 点击商品下架
                common.printgreen(
                    "准备下架---" + poco("AuctionDlg(Clone)").offspring("item0").offspring("ItemTpl").offspring(
                        "Name").get_text())
                poco("LeftButton").click()
                common.printgreen("下架成功")
                if poco("SellListEmpty").exists():
                    common.printgreen("上架下架测试完成")
        else:
            common.printgreen("没有道具可以出售....")
    poco("AuctionDlg(Clone)").offspring("GuildAuc").child("SelectedTextLabel").click()  # TODO:点击拍卖行

    poco("AuctionDlg(Clone)").offspring("Table").child("item0").child("Label").click()  # TODO:点击工会拍卖
    if poco("Result").exists():  # 判断工会拍卖按钮是否存在
        poco("Result").click()
        if poco("AuctionDlg(Clone)").offspring("ResultWindow").child("Title").exists():  # 判断工会拍卖弹窗是否存在
            common.printgreen(poco("AuctionDlg(Clone)").offspring("ResultWindow").child("Title").get_text() + "显示正确")
            poco(texture="l_close_00").click()  # 判断完成后点击返回
    A = poco("AuctionDlg(Clone)").offspring("Table").child("item1").child("Label").get_position()  # TODO:点击世界拍卖
    B = poco("AuctionDlg(Clone)").offspring("Table").child("item1").offspring("item0").child("Label").get_position()
    if A[1] - B[1] < 0.6:
        poco("AuctionDlg(Clone)").offspring("Table").child("item1").child("Label").click()
    freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
    for item in range(8):
        item1 = "item" + str(item)
        if freeze_poco("AuctionDlg(Clone)").offspring("Table").child("item1").offspring(item1).child("Label").exists():
            common.printgreen(freeze_poco("AuctionDlg(Clone)").offspring("Table").child("item1").offspring(item1).child("Label").get_text() + "显示正确")
    if poco("Result").exists():  # 判断世界拍卖是不是存在
        poco("Result").click()
        freeze_poco = poco.freeze()  # TODO:定义dongjiepoco
        if freeze_poco("AuctionDlg(Clone)").offspring("ResultWindow").child("Title").exists():
            freeze_poco(texture="l_close_00").click()
            common.printgreen(freeze_poco("AuctionDlg(Clone)").offspring("GuildAuc").child("SelectedTextLabel").get_text() + "界面显示正确")
    poco("AuctionDlg(Clone)").offspring("DragonCoin").child("SelectedTextLabel").click()  # 点击龙币交易所
    poco("AuctionDlg(Clone)").offspring("ItemLevel").child("Arrow").click()  # 仅显示当前可用
    poco("AuctionDlg(Clone)").offspring("ItemBlock").child("Arrow").click()  # 点上,等于微瑕疵重置环境准备
    return poco("t2").get_text()  # 商品购买后绑定