Can I use regex in Variable value

Ranorex Spy, Recorder, and Studio.
Posts: 42
Joined: Fri Oct 04, 2013 9:47 pm

Can I use regex in Variable value

Post by ngrishakin » Fri Jun 09, 2017 8:43 pm

Hello! Can someone help me to understand if I can use regular expression as value of Variable.
Every time I run the test I need unique First and Last name. Now in Ranorex studio I can use "Variables" button to store all my global values that I want to have access from every module of my project.
I created variable "FirstName" and assigned it a default value "FirstName_%S_%M%D%Y_%T"
which is a current timestamp. But when I use it and trying to type it in Edit box nothing happens.
Static variables work no problem. Any work around I can use? Again they should be accessible from every test case in my project.
Thank you so much,

User avatar
Posts: 173
Joined: Fri Jul 15, 2016 1:35 pm

Re: Can I use regex in Variable value

Post by Stub » Mon Jun 12, 2017 8:15 am

Sure you can. But if a repository item needs to take a regex variable value you'll need to ensure it's setup with the correct comparison operator e.g. text[@accessiblename~$RegExVariable]