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

Bug reports.
User avatar
Florent
Posts: 67
Joined: Wed Jul 04, 2012 3:31 pm
Location: Amiens / France

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

Post by Florent » Fri Mar 18, 2016 4:45 pm

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 ?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Mar 21, 2016 8:36 am

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?
Pavel Kudrys
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

User avatar
Florent
Posts: 67
Joined: Wed Jul 04, 2012 3:31 pm
Location: Amiens / France

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

Post by Florent » Mon Mar 21, 2016 9:39 am

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.

User avatar
Florent
Posts: 67
Joined: Wed Jul 04, 2012 3:31 pm
Location: Amiens / France

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

Post by Florent » Mon Mar 21, 2016 10:07 am

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

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Mon Mar 21, 2016 1:40 pm

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.
Shortcuts usually aren't...

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Mon Mar 21, 2016 1:51 pm

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.
Pavel Kudrys
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

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

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

Post by krstcs » Mon Mar 21, 2016 2:08 pm

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.
Shortcuts usually aren't...

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Tue Mar 22, 2016 1:39 pm

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