Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start_app启动应用之后poco("Panel")找不到UI元素 #70

Closed
chadwi opened this issue Apr 15, 2018 · 3 comments
Closed

start_app启动应用之后poco("Panel")找不到UI元素 #70

chadwi opened this issue Apr 15, 2018 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@chadwi
Copy link

chadwi commented Apr 15, 2018

环境Unity,如果不重启游戏,运行poco脚本完全正常,然后运行
stop_app("com.zoxun.huangsmj.xxbf")
start_app("com.zoxun.huangsmj.xxbf")
关掉app,再重新拉起来,程序就不能继续了,显示如下:

poco("huangs_HallMainPanel").child("root").child("info").child("left_top").child("userInfo").child("btn_diamond_red").wait(5).click()
  File "poco\proxy.py", line 450, in wait
  File "poco\proxy.py", line 560, in exists
  File "poco\proxy.py", line 37, in wrapped
  File "poco\proxy.py", line 524, in attr
  File "poco\proxy.py", line 653, in _do_query
  File "poco\freezeui\hierarchy.py", line 89, in select
  File "poco\sdk\Selector.py", line 77, in select
  File "poco\sdk\Selector.py", line 70, in getRoot
  File "poco\freezeui\hierarchy.py", line 35, in getRoot
  File "poco\utils\simplerpc\utils.py", line 13, in new_func
  File "poco\utils\simplerpc\simplerpc.py", line 75, in wait
RuntimeError: <poco.utils.simplerpc.simplerpc.Callback object at 0x0000000007B27FD0> timeout error

但是该代码不重启游戏的话,是正常的,不知道是不是start_app之后需要某些操作才能找到进程?

@rockywhisper
Copy link

@chadwi 在重启app后,poco连接是需要更新一次的。 重新实例化poco试下?

@adolli adolli added the bug Something isn't working label Apr 15, 2018
@adolli
Copy link
Member

adolli commented Apr 15, 2018

@chadwi 此问题已知,我们将再下个版本修复因游戏重启后poco没有自动重连的bug。

@chadwi
Copy link
Author

chadwi commented Apr 16, 2018

@rockywhisper 谢谢rocky,可以了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants