Hi,
I used the CheckFilesExists function of Ranorex library and I want to variate the pattern so i put it as a variable, but I want to customize it so that the pattern will start with the value of the variable and end with any text because the end of the name of the file changes.
To do so, I tried to use Regex in my variable but it does not work.
Is there a way to use Regex ?
Thank you
How to use Regex in Recording variables
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
How to use Regex in Recording variables
You do not have the required permissions to view the files attached to this post.
Re: How to use Regex in Recording variables
Hi,
I'm afraid, regex cannot be used like this in user code parameters. What you actually need to do is to manipulate the content of variable, either before using variable in user code method, or directly in method.
I'm afraid, regex cannot be used like this in user code parameters. What you actually need to do is to manipulate the content of variable, either before using variable in user code method, or directly in method.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 12
- Joined: Mon May 03, 2021 12:44 pm
Re: How to use Regex in Recording variables
Thank you for your answer.
And for anyone who needs to know, i managed to do that by adding a user code before the checkFilesExists, that concatenates two values, the first value takes the variable and the second one takes the regex metacharacter and i gave the returning concatenated value to the pattern.
And for anyone who needs to know, i managed to do that by adding a user code before the checkFilesExists, that concatenates two values, the first value takes the variable and the second one takes the regex metacharacter and i gave the returning concatenated value to the pattern.
Re: How to use Regex in Recording variables
Hi,
Thanks for sharing your solution!
Thanks for sharing your solution!
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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