You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/szh/opt/miniconda3/envs/test/lib/python3.8/site-packages/poco/proxy.py", line 272, in __len__
return len(nodes)
TypeError: object of type 'NoneType' has no len()
File "/Users/szh/opt/miniconda3/envs/test/lib/python3.8/site-packages/poco/proxy.py", line 272, in __len__
return len(nodes)
TypeError: object of type 'NoneType' has no len()
连接设备信息:
设备类型
设备型号
系统版本号
apk名称/下载链接
Android
提供最小可复现此BUG的代码:
无
The text was updated successfully, but these errors were encountered:
💡相关项目: Poco
标题: [BUG提交]循环点击一个元素,当元素消失时报错TypeError: object of type 'NoneType' has no len()
AirtestIDE版本: 无
报错描述:
poco从1.0.85升到1.0.89,发现个问题,同样的脚本,场景如下:
一个场景有2个按钮,定义好后,点一下A,再点一下B,循环点,比如点3下A就消失了,此时A.wait()会报错
根据报错内容看到272行是return len(nodes),也就是nodes可能是None。进入到nodes的求值方法_do_query(),发现与1.0.85不一样的地方就是多了一行self.invalidate(),怀疑是1.0.87添加refresh()功能引起的。
暂时修改/poco/proxy.py中__len__()方法,在272行返回前添加非None判断
之后正常
相关截图:
无
报错Log:
连接设备信息:
提供最小可复现此BUG的代码:
The text was updated successfully, but these errors were encountered: