Keeping line breaks while using TypeInto for web textbox

Forgive my ignorance as this is my first post and it took me way to long to find a suitable answer to the problem I was having. I’m new and not super knowledgeable about this platform but I’m slowing learning. I’m creating this post to share my solution with others and see if there’s a better way to accomplish what I was trying to do.

Problem Set-up:

  • Need to read data from an excel sheet and store in a data table.
  • Some of the cells in the excel table had text with line breaks in them. (hit the Alt + Enter keys to get a line break for those who don’t know)
  • When I wrote the data from the data table to a Message Box or Log it was formatted correctly with all the line breaks but when I wrote into a textarea on a JSON-form it lost all the line breaks.

Solution
I had to click the TypeInto box and under the Options section check the box next to SimulateType to set it to true.

Tried
I tried to use vbcrlf, vbcr, environment.newline, vbnewline, \n, \r\n but I couldn’t get any of those options to work.
Setting the SendWindowMessages to true also didn’t work
Some key words I searched for was: new line, return carriage, and line break(s)

Ultimately, it was this post that helped me find my answer. If my solution doesn’t work for you this may help.

https://forum.uipath.com/t/sap-web-gui-type-into-activity-line-breaks-not-processed/63226/12

If there is a better way to accomplish writing into a text field on the web while keeping the line breaks I am open to suggestions. Thanks!