Skip to content

sim-use 在复杂场景下无法拿到较深层级的视图信息 #89

Description

@KasumigaokaUtaha

问题表现:sim-use ui --point <x,y> 不会输出给定坐标下可见的 UI 元素,但 AXe 能输出对应的 UI 元素("AXUniqueId" : "ic_video_genre")。

sim-use 的输出:

sim-use-old ui --udid 0BBE3F89-B2C3-42B9-95AA-90BAFA315E93 --point 160,170
Subtree: com.ss.iphone.ugc.sicilycm.inhouse

[Content]
  @1  StaticText  "扭扭棒|冰淇淋教程🍦 毛茸茸的扭扭棒冰淇淋教程来啦!!! 3分钟教会你~ 夏天到了,快跟我做起来吧!"  (12,420 179x40)
  @2  StaticText  "🪡🧵一起来做兔耳朵痛包吧『可挂式痛包教程分享』"  (211,420 179x40)
  @3  Group  ""  (0,102 402x703)
  @4  StaticText  "查理理夫人"  (32,469 55x13)
  @5  StaticText  "秋秋的缝纫日记"  (231,469 77x13)
  @6  StaticText  "932"  (168,469 23x14)
  @7  StaticText  "5335"  (360,469 30x14)
  @8  StaticText  "想吃谁做的就艾特谁~"  (211,766 179x20)
  @9  StaticText  "香辣入味,软烂脱骨,一口一个超级过瘾!"  (12,766 179x40)
  @10  StaticText  "糯糯爱吃"  (231,795 44x13)
  @11  StaticText  "2964"  (360,795 30x14)
  @12  StaticText  "小陈同学~"  (32,815 55x13)
  @13  StaticText  "1.4万"  (161,815 30x14)
  @14  Button  "上拉加载更多"  (0,3226 402x44)

AXe 的输出:

axe describe-ui --udid 0BBE3F89-B2C3-42B9-95AA-90BAFA315E93 --point 160,170
{
  "role_description" : "group",
  "help" : null,
  "AXFrame" : "{{4, 152}, {195, 260}}",
  "role" : "AXGroup",
  "AXUniqueId" : null,
  "title" : null,
  "pid" : 36073,
  "subrole" : null,
  "traits" : [

  ],
  "children" : [
    {
      "AXValue" : null,
      "role" : "AXGroup",
      "pid" : 36073,
      "children" : [
        {
          "AXFrame" : "{{171, 160}, {20, 20}}",
          "subrole" : null,
          "children" : [

          ],
          "pid" : 36073,
          "content_required" : false,
          "AXLabel" : null,
          "traits" : [

          ],
          "frame" : {
            "height" : 20,
            "x" : 171,
            "width" : 20,
            "y" : 160
          },
          "AXUniqueId" : "ic_video_genre",
          "type" : "Image",
          "role" : "AXImage",
          "enabled" : true,
          "title" : null,
          "AXValue" : null,
          "help" : null,
          "role_description" : "image",
          "custom_actions" : [

          ]
        }
      ],
      "role_description" : "group",
      "AXFrame" : "{{171, 160}, {20, 20}}",
      "traits" : [

      ],
      "title" : null,
      "AXLabel" : null,
      "subrole" : null,
      "content_required" : false,
      "AXUniqueId" : null,
      "type" : "Group",
      "help" : null,
      "custom_actions" : [

      ],
      "frame" : {
        "height" : 20,
        "x" : 171,
        "width" : 20,
        "y" : 160
      },
      "enabled" : true
    }
  ],
  "custom_actions" : [

  ],
  "frame" : {
    "height" : 260,
    "x" : 4,
    "width" : 195,
    "y" : 152
  },
  "AXValue" : null,
  "AXLabel" : null,
  "type" : "Group",
  "enabled" : true,
  "content_required" : false
}

App 截图 Image

这个差异背后的原因是 AXe 对 FBSimulatorControl 魔改了一下,cameroncooke/idb@8e467bcfeeb91086a151af299732031c8904cac9。

咱们有计划跟进这个修复吗?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions