fix 对某个节点或子节点进行点击
This commit is contained in:
@@ -349,8 +349,7 @@ object AccessibilityUtil {
|
||||
* 对某个节点或子节点进行点击
|
||||
*/
|
||||
fun performClickWithSon(nodeInfo: AccessibilityNodeInfo?): Boolean {
|
||||
var nodeInfo: AccessibilityNodeInfo? = nodeInfo ?: return false
|
||||
while (nodeInfo != null) {
|
||||
if (nodeInfo == null) return false
|
||||
if (nodeInfo.isClickable) {
|
||||
nodeInfo.performAction(AccessibilityNodeInfo.ACTION_CLICK)
|
||||
return true
|
||||
@@ -361,11 +360,10 @@ object AccessibilityUtil {
|
||||
return true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
nodeInfo = null
|
||||
}
|
||||
}
|
||||
return false
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user