cancel
Showing results for 
Search instead for 
Did you mean: 

What attribute to use for name mapping Android object?

Highlighted
Occasional Contributor

What attribute to use for name mapping Android object?

Hello,

I've been using TC for iOS for a little over a year, off and on. For iOS, we use "accessibilityLabel" for name mapping to have a specific attribute to an object.

What is the standard that is used for Android?

 

Thanks.

5 REPLIES 5
Highlighted
Community Hero

Re: What attribute to use for name mapping Android object?

It really depends on the application and how it was developed, there isn't one hard and fast rule. We ended up using mContentDescription when automating a React Native app for example as that's where our developers put our automation tags. 

 

 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Occasional Contributor

Re: What attribute to use for name mapping Android object?

Thanks. I'm still learing about Android. I believe our dev will be using Kotlin. Tags for that?

Highlighted
Community Hero

Re: What attribute to use for name mapping Android object?

Kontlin is just a programming language, not a UI tool kit nor do I know what kind of properties will be set, so again it completely depends on what the developers use when building UI components.

 

Without seeing your application I have no idea what properties would give you unique values, or what combination. There is nothing that says this platform + this language means use this property all the time. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Highlighted
Occasional Contributor

Re: What attribute to use for name mapping Android object?

Thanks. I just wasn't aware if there was a standard or not. When we started into iOS, different developers with different backgrounds all said that "accessibilityLabel" was the commonly used attribute for iOS. I just thought that perhaps there would be an equivalient in Android.

Highlighted
Community Hero

Re: What attribute to use for name mapping Android object?

That is used a lot fo iOS though I don't really agree with that point. It's used for the accessibilty features of the OS and is very subject to change at anytime to become ADA compliant. If they are by chance using the standard Android UI toolkit, I believe they should be able to provide a View_ID for each control, but don't quoted me on that exactly, been a while since I've written anything for android. 


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
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

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!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors