I have a reusable recording where it returns a value from a function and stores it in a variable (lets say _balance).
Now I want to use this recording 2 times in the same test case (because I want to check the value returned by this function before and after clicking submit). So I copy pasted the same recording 2 times in the same test case
Now the problem is that I can’t assign the return value to 2 different variables in each recording. Whenever I set the return value to a new variable in the first recording the same is reflecting in the second. So how to assign the value to a different variables in each recording.
Using same recording multiple times in a test case
Re: Using same recording multiple times in a test case
Hi,
What you can do is to bind recording variable to different TestCase/SmartFolder parameters. And later use these two (or more) parameters for evaluation. Let’s the structure of your test looks like this...
What you can do is to bind recording variable to different TestCase/SmartFolder parameters. And later use these two (or more) parameters for evaluation. Let’s the structure of your test looks like this...
Hope this helps?[TestCase] ->param1, param2,..., paramN
|_RecModule1 - bind return variable with param1
|_RecModule2
|_RecModule3
|_RecModule1 - bind return variable with param2
|_CodeModule -> evaluate param1 & param2
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
Re: Using same recording multiple times in a test case
Yes, I did the same already.
I have 2 variables (_retDbtAvBal1 and _retDbtAvBal2) for each recording. But in the first recording when the return value is assigned to _retDbtAvBal1
the same is reflecting in the second recording as well. and if i change the second recording return value the same is reflecting in the first as well.
That means all the time the variables assigned to get the return values are same in both the recordings.
I have 2 variables (_retDbtAvBal1 and _retDbtAvBal2) for each recording. But in the first recording when the return value is assigned to _retDbtAvBal1
the same is reflecting in the second recording as well. and if i change the second recording return value the same is reflecting in the first as well.
That means all the time the variables assigned to get the return values are same in both the recordings.
Re: Using same recording multiple times in a test case
Hi,
You don’t need two recording module variables but two Test Case/Smart Folder parameters to which you bind recording module variable (which holds the return value). Now if you call the module for the first time, the return value will be stored in TC/SF parameter1. If you call the same module second time, it should store return value in TC/SF parameter2. So in the end, both return values are stored in different parameters, which you can process later in another module.
You don’t need two recording module variables but two Test Case/Smart Folder parameters to which you bind recording module variable (which holds the return value). Now if you call the module for the first time, the return value will be stored in TC/SF parameter1. If you call the same module second time, it should store return value in TC/SF parameter2. So in the end, both return values are stored in different parameters, which you can process later in another module.
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