Is it possible to get a drop down menu in arguments?

Ask general questions here.
MJesper
Posts: 38
Joined: Fri Dec 28, 2018 2:16 pm

Is it possible to get a drop down menu in arguments?

Post by MJesper » Thu Feb 14, 2019 10:29 am

Hi, I'm wondering if it's possible to get a drop down menu where you can choose different arguments similar to InvokeAction for my own User Code methods?
Image

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

Re: Is it possible to get a drop down menu in arguments?

Post by odklizec » Thu Feb 14, 2019 10:36 am

Hi,

I'm afraid, I don't understand what you want to do. Could you please describe, in more details, what exactly you want to achieve? Thanks.

Arguments for User Code actions are defined via method parameters. In Recoring module, you can see three of them directly in UI, the rest of parameters must be edited via dialog.
UserCode_params.png
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 Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

MJesper
Posts: 38
Joined: Fri Dec 28, 2018 2:16 pm

Re: Is it possible to get a drop down menu in arguments?

Post by MJesper » Thu Feb 14, 2019 10:51 am

I want to be able to make a list with pre-defined values for my arguments that I can later "choose from" in the dropdown menu, similar to when you choose a variable.

Image

Notice in this picture how there's only one avaible option for me? I want a way to do something more like this:
Image

This way I'm not limited by the variable system and can create lists of arguments and select one that I need, instead of hardcoding strings.
Take this example: You have an argument called "Gender", in this argument you only want "Male" and "Female" to be the options, but what if someone misspells this into "Mele"? then it won't work and you have to debug why.

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

Re: Is it possible to get a drop down menu in arguments?

Post by odklizec » Thu Feb 14, 2019 10:55 am

Hi,

I don't think this is currently possible. You can create a feature request (or search similar request) here:
https://uservoice.ranorex.com/forums/15 ... ve-ranorex
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

MJesper
Posts: 38
Joined: Fri Dec 28, 2018 2:16 pm

Re: Is it possible to get a drop down menu in arguments?

Post by MJesper » Thu Feb 14, 2019 11:11 am

Do you know if there are any workarounds? I have a list of a bunch of strings that I need to put into arguments and I don't really wanna fall flat on misstyping

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

Re: Is it possible to get a drop down menu in arguments?

Post by odklizec » Thu Feb 14, 2019 12:02 pm

An ideal (and most recommended) solution is passing values to methods via variables. And given variables should be filled from DataConnector. I would personally never pass values to methods via hardcoded strings.
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