Tencent / GAutomator

Automation for mobile games
1.34k stars 384 forks source link

A null value was found where an object instance was required #59

Closed linjinglan closed 5 years ago

linjinglan commented 5 years ago

Hello,有个问题,有调用游戏中的方法,表面看上去,该方法已经执行成功,但是,sdk报错,导致测试案例无法进行下去,求问这是啥问题,错误信息及截图如下 : sdk version: Engine = Unity3D 5.6.5f1,WeTest SDK = 1.5.0,UI=NGUI PARAM ['-39.51', '-10.58', '-23.82'] Traceback (most recent call last): File "mytest.py", line 91, in test() File "mytest.py", line 21, in test engine.call_component_method(auto_test, "GAutoTest", "AutoMove", params) File "E:\Downloads\wetest_sdk\GAutomator\wpyscripts\wetest\engine.py", line 828, in call_component_method "methodName": method, "parameters": params}) File "E:\Downloads\wetest_sdk\GAutomator\wpyscripts\common\socket_client.py", line 111, in send_command raise e wpyscripts.common.wetest_exceptions.WeTestSDKError: Error code: 7 msg: A null value was found where an object instance was required.

image

tianshanfz commented 5 years ago

应该是传递的参数有问题,如果不影响使用 可以在脚本外面调用call_component_method处try catch住这个异常

linjinglan commented 5 years ago

应该是传递的参数有问题,如果不影响使用 可以在脚本外面调用call_component_method处try catch住这个异常

好的,谢谢