cancel
Showing results for 
Search instead for 
Did you mean: 

Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects anymore

SOLVED
Highlighted
Occasional Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Occasional Contributor

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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ś

 

View solution in original post

7 REPLIES 7
Highlighted
Community Hero

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Occasional Contributor

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

@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

 

Highlighted
Community Hero

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] 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 Heroes]
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 Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
Highlighted
Community Manager

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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 solutionSmiley Happy


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
Occasional Contributor

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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ś

Highlighted
Occasional Contributor

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

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ś

 

View solution in original post

Highlighted
Community Manager

Re: Android Object Testing - On-Screen Action "Drag..." option doesn't recognize objects a

Glad to hear it is solved!

Thank you for the update.


Sonya Mihaljova
Community and Education Specialist

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

Changing options from outside of TestComplete

Participate!

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!
Top Kudoed Authors