Unable to convert a string to a intiger32

I am capturing a value using ‘Get Text’ and assigning as a string (in the example i captured “02”) . i simply need to convert to a integer have have been using an ‘Assign=Convert.Toint32(“trim”)’. I keep getting the following error

“Assign: input string was not in correct format”.

I have even tried to remove the leading zero (that’s why you see the “trim” in the screen shot) but i get the same error with 02 or 2.


Below are variables

Hi @Waterfowl_Waterfowl_hunte

Try the below syntax:
Convert.ToInt32(Trim)

Since after Get Text you are assigning the value to a variable Trim. You need not pass a variable within double qoutes.

Regards

OMG. i should have known that. im getting tired. long day. Thank you very much!

Glad to have helped @Waterfowl_Waterfowl_hunte

Happy Automation!!

You shouldn’t name a variable Trim as it’s the name of a method.

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