代码很简单,如下。却报错text找不到。
换作bounds(),id()也一样。
用悬浮窗的控件查看器是可以看到的。
var h = textMatches(/\+\d{1,3}g/)
.untilFind();
toastLog("adding "+h.text());
09:29:27.263/E: TypeError: Cannot call property text in object com.stardust.automator.UiObject@138483; boundsInParent: Rect(0, 0 - 57, 25); boundsInScreen: Rect(714, 402 - 885, 477); packageName: com.eg.android.AlipayGphone; className: android.view.View; text: +69g; contentDescription: null; viewId: null; checkable: false; checked: false; focusable: false; focused: false; selected: false; clickable: false; longClickable: false; enabled: true; password: false; scrollable: false; [ACTION_ACCESSIBILITY_FOCUS, ACTION_NEXT_AT_MOVEMENT_GRANULARITY, ACTION_PREVIOUS_AT_MOVEMENT_GRANULARITY, ACTION_NEXT_HTML_ELEMENT, ACTION_PREVIOUS_HTML_ELEMENT]. It is not a function, it is "undefined". (<test+3g>#3)
at script(<test+3g>:3)