Forum Discussion
Hi,
> @AlexKaras @Marsha_R , do you have any ideas?
I will check with the current 14.71 version of TestComplete and let you know the result.
What worked for me previously:
-- '... am force-stop ...' to stop application;
-- PackManagerObj.RemovePackage(PackObj, False); to remove the package;
-- PackManagerObj.InstallPackage(PackObj, true); to install the package;
-- http://blog.falafel.com/instrumenting-android-apps-ii/, http://blog.falafel.com/instrumenting-android-apps-iii/ to check if the application was properly instrumented;
-- '... am start -n <process>/<activity>' or PackManagerObj.LaunchPackage(PackObj); to start application;
-- app.Instrument(); to (re-)instrument tested application.
- C-Hansen4 years agoOccasional Contributor
Hi everyone,
Have you figured out a solution to this problem or have you heard from Smartbear, because I was thinking about opening a support ticket about this issue.
There is definitely something that has changed, with the new way instrumentation works in 14.70 and 14.71. At least I didn't have the issue on 14.61 and before that.
We have used the adb force-stop command for a long time followed by LaunchPackage method without any issues, but now we have noticed the same thing as described by OP. After a force-stop the only way of getting TestComplete to notice the objects again seems to be to reinstall the app. Not even manually opening the app on the phone works.
However I've also seen the issue without actively doing a force-stop command. Before I could instrument the app and it would just work. I could go a whole work day debugging and testing on that app. However now I notice that I often need to reinstall the app because TestComplete can't see the objects. I'm not sure when it happens, might be after a crash of the app, the system killing the app by itself or something else. After it happens there seem to be no way of launching the app again without a reinstall.
Thanks.
- NikitaPyatakov4 years agoOccasional Contributor
2 C-Hansen
adb force-stop command - this command kills the process itself and all its child processes - that's why we don't see objects
This is because your application is called through the TestComplete agent on the device while running the application with the prefix ". tctest" as a child process of your main application
Kulibins...
- C-Hansen4 years agoOccasional Contributor
Thank you NikitaPyatakov.
That gives me an idea about the cause but what about the solution? Is the only solution to reinstall the app then or did you get any information on this?
For example: Can you call an ADB command with the prefix, add the prefix in the parameter to the LaunchPackage method or something?
Otherwise I would at least like a way from TestComplete to launch the app in the needed state without reinstalling it.
Related Content
Recent Discussions
- 10 hours ago