Hi there,
I have a test case that has an "Unbound variable" and is flagged as a warning.
I'm not sure how to remove this unbound variable as the test case has no datasource.
Is there a way of removing this unbound variable?
See attached snapshots.
Brad.
Unbound variable warning
Unbound variable warning
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unbound variable warning
Hi,
Currently not but I already added this feature request, see the following forum post: Unbound variables.
Regards,
Markus
Currently not but I already added this feature request, see the following forum post: Unbound variables.
Regards,
Markus
Re: Unbound variable warning
Bsing,
You could also add a global parameter to your test suite (like "UNMAPPED_VAR") and bind any unmapped variables to it.
In your test suite,
1. Right click the top-level test suite name.
2. Select "Global Parameters".
3. Add the parameter to the list.
4. Click 'OK'.
5. Right click the desired test or test case.
6. Select "Data Binding".
7. Map the parameter from 3. above to any test variables that you don't want to see warnings for.
8. Click OK.
Hope this helps!
You could also add a global parameter to your test suite (like "UNMAPPED_VAR") and bind any unmapped variables to it.
In your test suite,
1. Right click the top-level test suite name.
2. Select "Global Parameters".
3. Add the parameter to the list.
4. Click 'OK'.
5. Right click the desired test or test case.
6. Select "Data Binding".
7. Map the parameter from 3. above to any test variables that you don't want to see warnings for.
8. Click OK.
Hope this helps!

Re: Unbound variable warning
Has this defect been fixed yet? I have download the latest Ranorex (4.0.2) and am still getting warnings in the reports for unbound variables.
Re: Unbound variable warning
I do not believe that what you are referring to is actually a defect, but is instead a design decision. You want that warning so you know if things aren't being mapped when they should be.
My suggestions:
1. If you have a variable that isn't being mapped because it isn't needed, you should remove it from the test module.
2. If you need the variable in the module then you can use the process that I posted originally to map the variable to a global parameter that isn't used. That will avoid the warning.
My suggestions:
1. If you have a variable that isn't being mapped because it isn't needed, you should remove it from the test module.
2. If you need the variable in the module then you can use the process that I posted originally to map the variable to a global parameter that isn't used. That will avoid the warning.
Shortcuts usually aren't...
Re: Unbound variable warning
Yes ... you are correct. I wasn't sure how to remove unwanted module variables ... but worked it out.
Thanks
Brad.
Thanks

Brad.
Re: Unbound variable warning
On further investigation only the unused module variables are able to be removed.
I still get "Unbound varables" even when they are being used.
I still get "Unbound varables" even when they are being used.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Unbound variable warning
Hello,
The message "Unbound variables" will be shown in your test suite if there is at least one variable, which is not bound to a Data Source. There is no difference between a used or an unused variable. As krstcs said this is a design decision.
Regards,
Bernhard
The message "Unbound variables" will be shown in your test suite if there is at least one variable, which is not bound to a Data Source. There is no difference between a used or an unused variable. As krstcs said this is a design decision.
Regards,
Bernhard
Re: Unbound variable warning
Hi , Im using Ranorex 5.2.2xxx
Can some one tell me the steps to delete a module variable.
couldn't find it
Can some one tell me the steps to delete a module variable.
couldn't find it

Re: Unbound variable warning
Hi,
You can delete module variables via Edit Variables dialog. But it's possible to delete only "not used" variables! In other words, if you want to delete a module variable, you first need to remove all references of the variable from recording and/or user code. Once done, variable is set as "Not in use" and only then you can delete it.
You can delete module variables via Edit Variables dialog. But it's possible to delete only "not used" variables! In other words, if you want to delete a module variable, you first need to remove all references of the variable from recording and/or user code. Once done, variable is set as "Not in use" and only then you can delete it.
You do not have the required permissions to view the files attached to this post.
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: 2
- Joined: Tue Mar 21, 2017 4:41 pm
- Location: Kiev
Re: Unbound variable warning
I have a testcase with a module with 2 variables that worked fine. After adding a second recording module in the same test case with two additional (different) local variables, I notice that each time I bind the two variables in module 2, the ones in the other recording become unbound?! And when I bind the ones in recording 1, the two variables in recording 2 become unbound. Pardon my French, but this is annoying me a lot, help appreciated.
-
- Posts: 2
- Joined: Tue Mar 21, 2017 4:41 pm
- Location: Kiev
Re: Unbound variable warning
Ok, I got it, one datafile per test case. Hurray for myself? 
