Closed winniewang0813 closed 4 months ago
ATX版本:0.10.0
c:; cd 'c:\robotframework-androidapp\Library\U2Library'; & 'C:\Users\CNWIWAN14\AppData\Local\Programs\Python\Python37\python.exe' 'c:\Users\CNWIWAN14.vscode\extensions\ms-python.python-2022.20.1\pythonFiles\lib\python\debugpy\adapter/../..\debugpy\launcher' '54336' '--' 'c:\robotframework-androidapp\Library\U2Library\app.py' the locator is com.abb.welcome:id/layout_cancel False the xpath is //*[@resource-id="com.abb.welcome:id/chk_eula"] False the locator is com.abb.welcome:id/layout_cancel 执行到这里开始报错:
12-15 11:50:06.543 22820 24125 W System.err: java.lang.StackOverflowError: stack size 1039KB 12-15 11:50:06.548 22820 24125 W System.err: at android.util.SparseArray.get(SparseArray.java:134) 12-15 11:50:06.548 22820 24125 W System.err: at android.util.SparseArray.get(SparseArray.java:125) 12-15 11:50:06.548 22820 24125 W System.err: at android.view.accessibility.AccessibilityInteractionClient.getConnection(AccessibilityInteractionClient.java:204) 12-15 11:50:06.548 22820 24125 W System.err: at android.view.accessibility.AccessibilityInteractionClient.findAccessibilityNodeInfoByAccessibilityId(AccessibilityInteractionClient.java:465) 12-15 11:50:06.548 22820 24125 W System.err: at android.view.accessibility.AccessibilityNodeInfo.getChild(AccessibilityNodeInfo.java:1121)
uiautomator2.exceptions.JSONRPCError: -32001 Jsonrpc error:
it should fixed now( I guess)
执行几次就报错
手机型号 OnelPlus 9 (Android 12)
uiautomator2的版本号(
pip show uiautomator2
) Name: uiautomator2 Version: 2.16.21 Summary: Python Wrapper for Google Android UiAutomator2 test tool Home-page: https://github.com/openatx/uiautomator2 Author: codeskyblue Author-email: codeskyblue@gmail.com License: MIT Location: c:\users\cnwiwan14\appdata\local\programs\python\python37\lib\site-packages Requires: adbutils, cached-property, Deprecated, filelock, logzero, lxml, packaging, Pillow, progress, requests, retry, six, whichcraft Required-by: weditor手机截图 手机设置:
相关日志(Python控制台错误信息, adb logcat完整信息, atxagent.log日志) at java.lang.Thread.run(Thread.java:920) , method: exist
最好能附上可能复现问题的代码。
def wait_for_exists_by_resourceId(self,locator,timeout): """
Wait for the object (wait until the ui object appears) which has selectors within the given timeout.
def wait_for_exists_by_xpath(self,locator,timeout): """
Wait for the object which has selectors within the given timeout.
if name=='main': apk = 'com.abb.welcome' test=AndroidAppTool() test.connect_device('300140e3')