Hello all,
another quick question.
I have a recording that performs the normal File open action. In the folder where my test data is, there is 10 demo images.
The first 3 tests use 1 image and then then next 3 use another and so on.
I have the following XPath: */*/row/cell[@text=$SwimmingAlgae]
The above is set t a variable "$SwimmingAlgae" for the first 3 tests,but the next 3 need to be using "$WallDemo"
If I change this in the repo it affects ALL test recordings. So the first 3 get changed to using "$WallDemo" instead of "$SwimmingAlgae" which I don't want.
Any help in forcing this to stop would be great.
Regards
Joe
Repo Variables
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Repo Variables
Hi,
Are you using the Data Driven approach?
Are you working with the repository or is this a RxPath from UserCode?
Do you have already tried setting the first variable to different values instead of changing the variable itself?
Regards,
Markus
Ranorex Support Team
Are you using the Data Driven approach?
Are you working with the repository or is this a RxPath from UserCode?
Do you have already tried setting the first variable to different values instead of changing the variable itself?
Regards,
Markus
Ranorex Support Team
Re: Repo Variables
Working with the repository and setting variables in there.
So in the repository I have an object named "TestImages" with 9 variables assigned. This object is only used in 1 recording, which gets executed for every test case.
At the moment, I right clicked on this "TestImages" object and selected "Make Item Variable" from within a recording and filled out the ones I require (9 in total).
The issue is when I change the variable for one test case, it affects them all. (which is understandable).
How can I avoid this, is user code the best way?
Thanks
J
So in the repository I have an object named "TestImages" with 9 variables assigned. This object is only used in 1 recording, which gets executed for every test case.
At the moment, I right clicked on this "TestImages" object and selected "Make Item Variable" from within a recording and filled out the ones I require (9 in total).
The issue is when I change the variable for one test case, it affects them all. (which is understandable).
How can I avoid this, is user code the best way?
Thanks
J
- Support Team
- Site Admin
- Posts: 12167
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Graz, Austria
Re: Repo Variables
Hi,
You shouldn't change the repository variable, you should use another recording variable or set the specific recording variable via the data connector to another value.
For more information please take a look at the following links:
Lesson 3: Data-Driven Testing
Using Variables with Code Modules
Regards,
Markus
Ranorex Support Team
You shouldn't change the repository variable, you should use another recording variable or set the specific recording variable via the data connector to another value.
For more information please take a look at the following links:
Lesson 3: Data-Driven Testing
Using Variables with Code Modules
Regards,
Markus
Ranorex Support Team