Hi,
I defined a test case variable in a recording module; used it, then realized I don't need it. It shows it is in use....and won't delete.
I double checked that it is not in use in the repository variables and not in user code. I've build cleaned > build rebuilded. Restarted.
I deleted the recording module, rebuilt. Added my actions -- STILL won't show not in use.
Thoughts? Seems this occurs too often.
Thanks for the help.
Lorinda
Cannot remove unused variable in rec module test case - Studio 9.2
Re: Cannot remove unused variable in rec module test case - Studio 9.2
Hi,
Any chance you could share the problematic solution? Or can you reproduce the issue with freshly created project?
Any chance you could share the problematic solution? Or can you reproduce the issue with freshly created project?
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: Cannot remove unused variable in rec module test case - Studio 9.2
Hello!
I hit this issue again today, went searching for a solution...then, found my own post about it.
Here's how to reproduce this...and by this I mean where variables show as "In Use" even though they are not in User Code AND they are not visually showing on the action line anywhere in a recording module:
1. In a recording module, add new Action with these values:
"Validate", "AttributeEqual", Value or Innertext (doesn't matter), create new variable "newVarA", any webelement
2. Build solution, then click "Variables" and see "newVarA" is shown "In Use"
3. Go back to 1 and change the Validation action to "Exists" (note that the parameters have changed for Exists so it shows nothing)
4. Repeat Step 2
This is very confusing (and super annoying) because one would expect that the variable created for AttributeEqual would not STILL be generated.
After a lengthy hunt through everything , and recreating the rec module to make the code generated go away...here's the workaround:
- Go to Step 1 above, change the Exists BACK to AttributeEqual and note the variable still exists on the action line. Click Droplist and select null or yourvalue......then rebuild.
Now, I realize there's going to be a camp with the opinion of "but you left the variable in there without unmapping it, so of course it is still there...", but I am not in that camp.
What is displayed in the action item line is what I know exists (especially! especially! after I rebuild and the code is regenerated!).
(Back when I initially reported this, I was on 9.2.0 and now I am on 9.2.1)
This is a silly thing to waste a few hours on.....very frustrating.
Lorinda
I hit this issue again today, went searching for a solution...then, found my own post about it.
Here's how to reproduce this...and by this I mean where variables show as "In Use" even though they are not in User Code AND they are not visually showing on the action line anywhere in a recording module:
1. In a recording module, add new Action with these values:
"Validate", "AttributeEqual", Value or Innertext (doesn't matter), create new variable "newVarA", any webelement
2. Build solution, then click "Variables" and see "newVarA" is shown "In Use"
3. Go back to 1 and change the Validation action to "Exists" (note that the parameters have changed for Exists so it shows nothing)
4. Repeat Step 2
This is very confusing (and super annoying) because one would expect that the variable created for AttributeEqual would not STILL be generated.
After a lengthy hunt through everything , and recreating the rec module to make the code generated go away...here's the workaround:
- Go to Step 1 above, change the Exists BACK to AttributeEqual and note the variable still exists on the action line. Click Droplist and select null or yourvalue......then rebuild.
Now, I realize there's going to be a camp with the opinion of "but you left the variable in there without unmapping it, so of course it is still there...", but I am not in that camp.
What is displayed in the action item line is what I know exists (especially! especially! after I rebuild and the code is regenerated!).
(Back when I initially reported this, I was on 9.2.0 and now I am on 9.2.1)
This is a silly thing to waste a few hours on.....very frustrating.
Lorinda
Re: Cannot remove unused variable in rec module test case - Studio 9.2
Hi Lorinda,
Good find! This is definitely a bug and something that should not happen! Once the Validate action (any action with assigned variable ) is changed to action without assigned variable, the variable should be unassigned as well. I can confirm that your steps are indeed reproducible.
I would suggest to create a new bug (referring to this post) in bug section of this forum. Or even better, contact Ranorex folks directly via their support form available here...
https://www.ranorex.com/support-query/
So there will be created an official support ticket.
Good find! This is definitely a bug and something that should not happen! Once the Validate action (any action with assigned variable ) is changed to action without assigned variable, the variable should be unassigned as well. I can confirm that your steps are indeed reproducible.
I would suggest to create a new bug (referring to this post) in bug section of this forum. Or even better, contact Ranorex folks directly via their support form available here...
https://www.ranorex.com/support-query/
So there will be created an official support ticket.
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: Cannot remove unused variable in rec module test case - Studio 9.2
Hi, Pavel!
I appreciate your checking this out; I'm glad we are in the same opinion camp on it being a BUG!
I submitted a support case directly with the details.
Take care,
Lorinda
I appreciate your checking this out; I'm glad we are in the same opinion camp on it being a BUG!
I submitted a support case directly with the details.
Take care,
Lorinda
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Cannot remove unused variable in rec module test case - Studio 9.2
Adding my reply to qa-auto's support ticket here for others:
Ned
Regards,I have also duplicated the behavior and can confirm this is not the expected behavior. I have since escalated this to our developers to further investigate.
Currently, we do not know if and when this issue will be fixed as this depends on various factors. Nevertheless, all-new features, updates, and bug fixes are documented in the release notes with every new version release of Ranorex.
https://www.ranorex.com/release-notes/
Ned