Hello!
I am a newbie for Ranorex and I like to know, if it is possible, to give some input parameters for text ( recording ).
For example, I have validation, which validates, if a window have text: "This will install Something 2.3.4v blah blah".
I need to replace it with for example "This will install {version} blah blah", and simply give "input parameter" with name version and value - Something 2.3.4v
So I can test different versions.
Any help would be highly appreciated!
Input parameters for recording.
Re: Input parameters for recording.
Not sure if you can do that with the recorder or not (I don't use it). But it is simple enough to do in code. You can write your own method to either pass in the version # you want to check for, or if you want to get a little more daring you can write some RegEx code to filter the version information on the fly...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Input parameters for recording.
The recommended way to support parameters for recordings is to create properties in the UserCode file and set these properties before you start the recording. Then convert the actions that should take parameters to User Code actions (see http://www.ranorex.com/support/user-gui ... tions.html) and use the properties in there.
For your example, you should create a "Version" property of type string in the UserCode file of the recording and convert the Validation action to a User Code action. In the user code action change the code so the validation string uses the "Version" property.
Please, see the "Data Driven Sample" included with the Ranorex installation that illustrates the technique mentioned above.
Regards,
Alex
Ranorex Support Team
For your example, you should create a "Version" property of type string in the UserCode file of the recording and convert the Validation action to a User Code action. In the user code action change the code so the validation string uses the "Version" property.
Please, see the "Data Driven Sample" included with the Ranorex installation that illustrates the technique mentioned above.
Regards,
Alex
Ranorex Support Team