Write the text in same format as available in String

Hi all,

I have been going through many posts in the forum but could not locate solution to my problem.

I have a text file with specific format. I need to write the same in the textbox but instead it converts everything in paragraph while writing.

The format of Text file is:

******DISPATCH REQUESTOR DETAILS *******
Team Name: XXX Email Address: ABC@xyz.com [ XXX Team ]
Phone Number: +XXXXXXX PIN: XXX

************ ON-SITE DETAILS ***********
Site ID:
Site address:
Site opening hours: 24x7
Site Access & Security Information:
Primary Site Contact Details: / / /
Site Access contact: / / /

FE responsibility to contact Site access contact or Primary Site contact to Grantee Access to the site on the scheduled date of visit.

********* INTERVENTION DETAILS **********

While writing this on the TextBox it writes like this:

******DISPATCH REQUESTOR DETAILS ******* Team Name: XXX Email Address: ABC@xyz.com [ XXX Team ] Phone Number: +XXXX PIN: XXX ************ ON-SITE DETAILS *********** Site ID: Site address: Site opening hours: 24x7 Site Access & Security Information: Primary Site Contact Details: / / / Site Access contact: / / / FE responsibility to contact Site access contact or Primary Site contact to Grantee Access to the site on the scheduled date of visit. ********* INTERVENTION DETAILS **********

However, I checked the string and it reads initial text file and captures it like this:

 "******DISPATCH REQUESTOR DETAILS *******\r\nTeam Name: XXX Email Address:   ABC@xyz.com      [ XXX Team ] \r\nPhone Number: +XXXXX PIN: XXX \r\n\r\n************ ON-SITE DETAILS ***********\r\nSite ID: \r\nSite address: \r\nSite opening hours: 24x7 \r\nSite Access & Security Information: \r\nPrimary Site Contact Details:   /  /  / \r\nSite Access contact:   /  /  / \r\n\r\nFE responsibility to contact Site access contact or Primary Site contact to Grantee Access to the site on the scheduled date of visit.\r\n\r\n********* INTERVENTION DETAILS **********\r\n"

Does anyone have any idea how I can preserve the initial format and write this template in the textbox ??

Thanks,

Hi
did we try to SET TO CLIPBOARD activity
like once after getting the text from txt file and saving it to a String variable named str_input
pass that str_input variable to SET TO CLIPBOARD activity as input
–now use SEND HOT KEY activity with no selector chosen for elements and mention the key as ctrl+v so that it will paste that value to that field

Cheers @mayank_26

1 Like

Thanks @Palaniyappan That worked. :smiley:

I tried Regular Expressions and writing line by line using DataTable activity as well but they didnt work for me.

1 Like

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