Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects anymore
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects anymore
Hi,
I started Android application tests in TestComplete. I was struggling with devices and application preparation to start with object test. I did everything the same like here it was written: https://support.smartbear.com/testcomplete/docs/app-testing/mobile/android/preparing/index.html
- Computer recognizes my device (Android 10 - Huawei Mate 20 Lite)
- I got enable TestComplete Android Agent on this device
- Testcomplete saying that application which I trying to test is already instrumented
- After I click on "Show Mobile Screen", I see my device and my app on it.
I tried to use "On-Screen Action" opperation with "Drag the target.." few times unsuccessfully. After this I clicked "Point and fix" option and I pressed (Ctrl+Shift+A) - that was a moment when I finally saw objects from application in those red rectangles. I prepared few actions on this app and next to it I run test (I had on my "actions queue" firstly "Run TestedApp" and below this, only "On-screen actions"). Application re-installed and test failed. I tried one more time do "On-Screen action" where i select objects, but since then I can't find out how to select objects instead of whole application screen when I use "On-screen action".
Please help.
Adam
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Adam,
Sounds wierd...
Can you let us know what language/technology your tested application was created with?
Also, you mentioned, that your tested application was re-deployed to the device on test start. Your Tested Aplication item must point to the instrumented version of the .apk file. (Or you need to do instrumentation from test code.) Can you double-check that instrumented application was re-deployed to the device?
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@AlexKaras Thanks for quick response!
App was created in Kotlin. I checked a lot of times if app is instrumented, since I know this is a key to object-based testing in TestComplete. It always returns "Your Android application is already instrumented". Screenshot attached.
Kind regards,
Adam
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
> App was created in Kotlin.
I think that this might be the reason of the unstable access to application's internals that you are experiencing. (I assume that device is prepared for testing as documented -- developer mode is on, etc. -- and has TestComplete agent installed.)
I don't remember anyone here talking about Kotlin, thus I would recommend to create Support ticket via the https://support.smartbear.com/message/?prod=TestComplete form.
I also would appreciate it if you update this thread and let us know the result of your communication with Support.
/Alex [Community Champion]
____
[Community Champions] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Champions]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Champion] signature is assigned on quarterly basis and is used with permission by SmartBear Software.
https://community.smartbear.com/t5/Community-Champions/About-the-Community-Champions-Program/gpm-p/252662
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for helping Alex.
Hi @AdamRyś , I see that you have raised a support ticket and the investigation is ongoing at the moment. Please keep us updated when you get a solution
Sonya Mihaljova
Community and Education Specialist
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi sonya_m,
I am still waiting for an answer. My problem has been escalated. If I will get any solution for this problem I will come back and write you what the reason for the error was.
Kind regards,
Adam Ryś
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I got answer from support:
"Our developers determined why the issue occurs - your app uses the controls which are not supported (androidx), and when TestComplete instruments such an app, it doesn't take into account the code which these controls add. Thus, we will need to make quite complex changes to the instrumentation process, this could take significant time - currently, we don't have any ETA when or whether we support such type of Android apps."
They recomended anyway to instument my application by PatchServices.jar from source code:
https://support.smartbear.com/testcomplete/docs/app-testing/mobile/android/preparing/instrumenting-a...
My developers added this .lib and it finally starts recognize my objects in app :).
So if your application uses "androidx" controls, instrumentation in TestComplete will be not enough, you will need do this by adding PatchServices.lib in source code.
Kind regards,
Adam Ryś
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to hear it is solved!
Thank you for the update.
Sonya Mihaljova
Community and Education Specialist
