Adding code module variables other than strings?

Ask general questions here.
Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Adding code module variables other than strings?

Post by Fergal » Wed May 25, 2016 10:22 am

When you "Insert New Module Variable" into a code module, it is automatically added as a string.

Is it possible to add a new module variable of another type, e.g. add an int module variable?

Thanks!

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3937
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Adding code module variables other than strings?

Post by odklizec » Wed May 25, 2016 12:13 pm

Hi Fergal,

Module variables are always strings, because data connectors currently supports only string-based data. In other words, there is currently no way to create module variables other than strings.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

Fergal
Certified Professional
Certified Professional
Posts: 298
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Adding code module variables other than strings?

Post by Fergal » Wed May 25, 2016 2:31 pm

Thanks odklizec! I have been using Parse to convert those string variables and was curious as to whether there was an easier way to do it.