Page 1 of 1

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

Posted: Thu Feb 14, 2019 10:29 am
by MJesper
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

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

Posted: Thu Feb 14, 2019 10:36 am
by odklizec
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

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

Posted: Thu Feb 14, 2019 10:51 am
by MJesper
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.

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

Posted: Thu Feb 14, 2019 10:55 am
by odklizec
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

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

Posted: Thu Feb 14, 2019 11:11 am
by MJesper
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

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

Posted: Thu Feb 14, 2019 12:02 pm
by odklizec
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.