Ask a Question

Xamarin Testing


Xamarin Testing

Hey guys,

we are about to switch all of our apps to Xamarin and wish to continue UI Testing with TestComplete. However, we experience problems with the Object recognition on Android:

  • Most objects have no id, some have an md5-hash as their id. It was so convenient on Android to have unique ids for most controls and this seems to be gone on Xamarin. Three questions concerning that: What are those md5-hashes based on, when do they change and is there any possibility to still set our own control id?
  • Some objects appear twice with the same id but a different ObjectIndex. I know this phenomenon only from iOS, where the UI is dynamically created during runtime and sometimes UI controls don't get recycled properly so if you reopen the same view again, you might end up with to identical controls, one of them being invisible and the other one being visible. This is a pain in the bum on iOS since it can be quite hard sometimes to determine in TestComplete the instance that is currently visible. My hope is now that we can somehow get rid of that too, but I have no idea how.


Screenshot of object ids: (1): md5-hashes, (2) Some objects appear twice


  • Objects are only accessible to a certain level. For instance, we can access and interact with "md52....MasterDetailContainer" but its only child "View("NO_ID")" is inaccessible. TestComplete cannot show a screenshot of it in the ObjectBrowser and any interaction with it (including "Highlight on screen") results in an error. This applies to all of its children, too. This is especially important to solve as all of our UI controls are children of that MasterDetailContainer and having no access to its children renders the tests useless.
  • TestComplete, the Xamarin Forms Designer and the Android UI Automator Viewer show a very different object hierarchy of the same view in the app. How can this be explained?

I've been talking to the dev team about all this but as they are new to Xamarin, too, they don't know the answers neither. On the other hand, I know that most of those questions are very specific to Xamarin itself, but I hope to find someone here who has experience with both, Xamarin and TestComplete, to help us out.



Champion Level 2

This article may be of some help:

Showing results for 
Search instead for 
Did you mean: