Write line generic value


#1

Hi guys,

I’ve been going through lesson 5 on Ui Paths essential training videos. Using a ‘Web recorder’ to capture stuff. Placed a ‘Write line’ function directly after my ‘Copy text’ results (2 results), subtracting the output of the second ‘Copy text’ to the first ‘Copy text’. It would look something like ‘Td1 - Td’. According to the video to ensure it be treated as an integer all I have to do is place a ‘0+’ behind it. My error as a result is: “Write line : Cannot add System.Int32 to System.String”

Can someone please help me?


#2

This only works with GenericValue variables.
Check if both the values captured from the web are stored in variables of type GenericValue
If the variable type is String you would be getting this error. That is what it seems to be from the error message.

Also, if the captured text is not a number, you might be having issues while adding them with a 0. Double check that as well.


#3

Both are Generic values and none consist of any string.


#4

Thank you for the help!

Turns out the interference of the dollar sign was the underlying issue.


#5

Perfect! There you go!