I have an excel file that includes some ticket information. When I run my scenario, a ticket ID is being generated in the application during the execution. I need to read that number and insert it into the column in the Excel file.
I have tried to copy the ID and paste it but it didn’t work.
I use the OCR action,Read Text into a variable, to grab text. It works pretty well…you just need to configure the search area and play with the settings when it fails.
In order to grab a text from a screen and use it (put it in a file), first try to use “Read Text Into a Variable” action as @Michal suggested. Put a variable name and make sure to set the “Text Area” property for it. To learn more about it, see this article.
Next, add a “Set String Variable” and define your variable name as the corresponding column name of the Excel file. Here is the format: (i.e. %Users:username%)
Then put the variable name of the “Read Text Into a Variable” action as its value.
Lastly, just add a “Write Line” action to insert the text in the Excel file.
To learn how to use MS Excel actions, see this article.