Can’t get text from View

Good afternoon,

I’m trying to get the text of a View with the getText() method. I’m referring to this documentation : https://docs.katalon.com/display/KD/%5BMobile%5D+Get+Text

But Katalon isn’t able to retrieve any text from my object. Is it because it’s not a TextView object?

Thank you for you answer.

Hi there,

How about using ‘name’, ‘label’ or ‘attribute’ input in ‘Get Attribute’ keyword ? Do you have a picture showing your test object details?

Thanks

Good morning,

Thank you for you answer… but it doesn’t work. When I retrieve the “text” attribute, it just prints me an empty string. And the “value” attribute prints “null”…

Hi there,

How about using ‘Get Attribute’ keyword and pass in ‘text’ or ‘value’ as input’s attribute?
Mobile.getAttribute(findTestObject(``'Application/android.widget.TextView - App'``), 'text'``, 5``)
Thanks