Page 1 of 1

i can't access to the "Insert Module Variable" context menu

Posted: Fri Mar 18, 2016 4:45 pm
by Florent
Hi Support Team,

i'm used to create cs files containing some scripts that i add to my Ranorex scenario.
I always add variables to these files by right clicking on a part of the page and click on "Insert Module Variable" to get the corresponding context menu.
Today, i can't access to the "Insert Module Variable" context menu.
I tried another file and it's the same issue.

Have you got an idea ?

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 8:36 am
by odklizec
Hi,

It seems it's currently possible to add a module variable only to code modules and not to User Code modules? If it worked before, then it looks like a bug in 5.4.5?

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 9:39 am
by Florent
Hi Odklizec,
i encounter this issue in code modules where there are already some variables previously added by accessing to the the menu "Insert Module Variable". It's really a bug.
i'm with Ranorex 5.2.2.
i want to reinstall Ranorex. Maybe it will solve the issue.

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 10:07 am
by Florent
i'm with Ranorex 5.2.4 now
the issue is not solved
i try to understand how TestVariableAttribute class works to find a solution

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 1:40 pm
by krstcs
Ranorex no longer supports versions 5.2.X. You need to upgrade to 5.4.5 if you want meaningful support.


Additionally, did you do a clean re-install?

1. Uninstall Ranorex.
2. Reboot.
3. Re-install using Ranorex-5.4.5.exe


EDIT:
In addition, mine works fine in 5.4.5, I can right-click and select "Insert Module Variable" in User-code as is expected.

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 1:51 pm
by odklizec
This is really weird. While right-clicking in Recording User Code module, I don't have this option available in 5.4.5 context menu. I only have this option when right-clicking in Code module.

Re: i can't access to the "Insert Module Variable" context menu

Posted: Mon Mar 21, 2016 2:08 pm
by krstcs
Oh, yeah, I misread it.

You can't add a module variable to a Recording module in code. You have to use the variable edit dialog. I believe this is intended due to how Ranorex reads the Variables for Recording modules.

The variables are stored in both the .RXREC and the .CS files and MUST BE EXACTLY THE SAME. If you add variables to the usercode file, it will interfere with how Ranorex reads the variables for the module, therefore they only allow adding/editing/deleting variables in Recording Modules from the variable edit dialog.

Re: i can't access to the "Insert Module Variable" context menu

Posted: Tue Mar 22, 2016 1:39 pm
by Support Team
Hello all,

krstcs is absolutely correct. In addition to that you can also use the "Variable" button in the toolbar in the upper right corner of the Recording.UserCode view in order to add module variables.

Regards,
Bernhard