元素对象是否存在 (selector.exists)

声明

元素对象是否存在 = selector(元素对象table).exists()

参数及返回值

  • 元素对象table
    • 必填项,元素对象的选择器信息,可通过"元素脚本生成"工具在线获取,比如{resourceId='abc'}
  • 元素对象是否存在
    • 布尔型,对象存在返回true, 对象不存在返回false

示例

r = selector({resourceId='com.android.systemui:id/keyguard_bottom_area'})
print(r.exists())
powered by GitbookFile Modify: 2021-03-27 23:14:19

results matching ""

    No results matching ""