Element.GetAll 获取界面元素
🎯功能
针对当前界面进行元素遍历
📜语法
结果 = Element.GetAll()
📥参数
无
📤返回
表
, 返回元素属性名与属性值, 详见下面例子
💡示例
Dim Table, iId, sClass, sText
Dim iLeft, iTop, iRight, iBottom
Table = Element.GetAll()
//获取第一个元素属性内容
iId = Table[1]["resource-id"]
sClass = Table[1]["class"]
sText = Table[1]["text"]
iLeft = Table[1]["left"]
iTop = Table[1]["top"]
iRight = Table[1]["right"]
iBottom = Table[1]["bottom"]
TracePrint iId
TracePrint sClass
TracePrint sText
TracePrint iLeft
TracePrint iTop
TracePrint iRight
TracePrint iBottom
📘备注
- 仅支持安卓5.0及以上系统版本