# Get Text crashes robot

**URL:** <https://forum.uipath.com/t/get-text-crashes-robot/293461>\
**Category:** Activities\
**Tags:** web, question, uiautomation, activities\
**Created:** [February 24, 2021, 12:12pm UTC](https://forum.uipath.com/t/get-text-crashes-robot/293461 "2021-02-24T12:12:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Joao\_Boconcelo](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/joao_boconcelo/32/179903_2.png) [@Joao\_Boconcelo](https://forum.uipath.com/u/Joao_Boconcelo)\
**Post date:** [February 24, 2021, 12:12pm UTC](https://forum.uipath.com/t/get-text-crashes-robot/293461/1 "2021-02-24T12:12:34Z")

</div>

I’m trying to get a text from a textfield with Get Text, but in some cases this field is optional and the robot crashes because it doesn’t have anything in the field.

---

<div class="post-metadata">

**Author:** ![SenzoD](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/senzod/32/479828_2.png) [@SenzoD](https://forum.uipath.com/u/SenzoD)\
**Post date:** [February 24, 2021, 12:26pm UTC](https://forum.uipath.com/t/get-text-crashes-robot/293461/2 "2021-02-24T12:26:30Z")

</div>

place the get text activity inside a try catch activity

Or Use an element exists activity to check if the text field exists and then an if activity to control the flow, what should happen if it does and doesnt

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [February 27, 2021, 12:26pm UTC](https://forum.uipath.com/t/get-text-crashes-robot/293461/3 "2021-02-27T12:26:58Z")

</div>

Closed on February 27, 2021, 12:26pm UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
