How to get value content desc?

Hey All, Can you help me, i can’t get value from attribute content desc.

Do you have the following statements above the statement that you show us? I was thinking you cannot get the text because the text is not present on the screen, so wait until the text is present, then verify it is present and then get it.

android - How can I wait for Mobile element - Stack Overflow

[Mobile] Verify Element Visible | Katalon Docs


I want to get value not to be verified, but to be retrieved and compared with other data.

Did you try get text method if it’s static value ( [Mobile] Get Text | Katalon Docs).

I’ve used the ‘get text’ code to get the content, but the ‘content-desc’ type doesn’t want to be picked up.
Hellppp Me…

@pariz.pariz Is it grabbing a different value than you expect or is it just an empty string? Also have you checked that the object you are looking for does actually have the content-desc you are expecting by using the mobile object spy?

just an empty string Bro… I don’t know what this result only empty string…

that’s my Result :

can you use code in stackoverflow? that’s code appium, how to implements code in katalon?

It doesn’t matter which web site you are getting your reference from. Just search for Selenium wait for statements, such as:

java - How to make Selenium wait until an element is present? - Stack Overflow

1 Like

what I need is value content-desc bro, and I’ve tried and added a “wait element” to the that’s object bro.

and the result is the same i.e. ‘empty string’

@pariz.pariz How are you detecting the object that you are looking for to get the content-desc? If the identifier is not unique or the view is slightly different while you are using xpath to find a relative object then you may be capturing a different object that does not have a content-desc.

Can you try either of these?
getAttribute using ‘name’ or ‘contentDescription’, instead of ‘content-desc’

I just noticed that you don’t have any of the items selected in the “Detect object by” column within the image.

Hopefully, you have something selected that allows the item to be found within the application.