Problems with Variables
Posted: Wed Apr 08, 2015 12:31 pm
Hello,
I'm new to ranorex and got a certain problem with variables.
For a testcase, I try to extract the version of our software from the titlebar, save it as variable and use it with further tests.
My first try was a simple module which extract the title (String), search for the Version-Number (via Regex) and convert it to integer for further usage.
This method works, but only inside of the module. It would be a lot better to have access to the version-variable on a higher level.
So I went on and searched for a method, so I extract the variable and make it possible to access it from another module - no success here. How can I do this?
Another thing I wondered: Via the Action GetValue in a module it is possible to extract some certain value and bind it to a variable. In my case the Item is the
TitleBar, but I only need the first number in the titlebar bound to the variable. Like I described it above, I used usercode to bind this to the variable - but is
there a faster way? Directly with Regex on the Element?
And if I code a method with a resulttype (so not void), how can I bind this result to a variable?
Thanks for the help.
Regards from Karlsruhe
Operating System: Local, Win7 64bit
Ranorex 5.3.1-22939
I'm new to ranorex and got a certain problem with variables.
For a testcase, I try to extract the version of our software from the titlebar, save it as variable and use it with further tests.
My first try was a simple module which extract the title (String), search for the Version-Number (via Regex) and convert it to integer for further usage.
This method works, but only inside of the module. It would be a lot better to have access to the version-variable on a higher level.
So I went on and searched for a method, so I extract the variable and make it possible to access it from another module - no success here. How can I do this?
Another thing I wondered: Via the Action GetValue in a module it is possible to extract some certain value and bind it to a variable. In my case the Item is the
TitleBar, but I only need the first number in the titlebar bound to the variable. Like I described it above, I used usercode to bind this to the variable - but is
there a faster way? Directly with Regex on the Element?
And if I code a method with a resulttype (so not void), how can I bind this result to a variable?
Thanks for the help.
Regards from Karlsruhe
Operating System: Local, Win7 64bit
Ranorex 5.3.1-22939