# Can’t get text from View

**URL:** <https://forum.katalon.com/t/can-t-get-text-from-view/6758>\
**Category:** Miscellaneous\
**Tags:** katalon-studio\
**Created:** [October 9, 2017, 10:29pm UTC](https://forum.katalon.com/t/can-t-get-text-from-view/6758 "2017-10-09T22:29:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Z\_T](https://avatars.discourse-cdn.com/v4/letter/z/ecccb3/32.png) [@Z\_T](https://forum.katalon.com/u/Z_T)\
**Post date:** [October 9, 2017, 10:29pm UTC](https://forum.katalon.com/t/can-t-get-text-from-view/6758/1 "2017-10-09T22:29:53Z")

</div>

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](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.

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [April 19, 2017, 1:33am UTC](https://forum.katalon.com/t/can-t-get-text-from-view/6758/2 "2017-04-19T01:33:55Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Z\_T](https://avatars.discourse-cdn.com/v4/letter/z/ecccb3/32.png) [@Z\_T](https://forum.katalon.com/u/Z_T)\
**Post date:** [April 18, 2017, 9:08pm UTC](https://forum.katalon.com/t/can-t-get-text-from-view/6758/3 "2017-04-18T21:08:03Z")

</div>

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”…

---

<div class="post-metadata">

**Author:** ![Zarashima](https://dub1.discourse-cdn.com/katalon/user_avatar/forum.katalon.com/zarashima/32/928_2.png) [@Zarashima](https://forum.katalon.com/u/Zarashima)\
**Post date:** [April 18, 2017, 5:44am UTC](https://forum.katalon.com/t/can-t-get-text-from-view/6758/4 "2017-04-18T05:44:53Z")

</div>

Hi there,

How about using ‘[Get Attribute](https://docs.katalon.com/display/KD/%5BMobile%5D+Get+Attribute)’ keyword and pass in ‘text’ or ‘value’ as input’s attribute?  
`Mobile.getAttribute(findTestObject(``'Application/android.widget.TextView - App'``),` `'text'``,` `5``)`  
Thanks
